Skip to content

Latest commit

 

History

History
172 lines (120 loc) · 3.42 KB

Set-PSFunctionInfoDefaults.md

File metadata and controls

172 lines (120 loc) · 3.42 KB
external help file Module Name online version schema
PSFunctionInfo-help.xml
PSFunctionInfo
2.0.0

Set-PSFunctionInfoDefaults

SYNOPSIS

Store default values for PSFunctionInfo commands.

SYNTAX

Set-PSFunctionInfoDefaults [[-Author] <String>] [[-CompanyName] <String>]
[[-Copyright] <String>] [[-Version] <String>] [[-Tags] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Because you might define function metadata often, and want to maintain consistency, you can define a set of default values for New-PSFunctionInfo. Set-PSFunctionInfoDefaults will create a JSON file at $home\psfunctioninfo-defaults.json. When you import this module, these values will be used to define entries in $PSDefaultParameterValues. Or, run Update-PSFunctionInfoDefaults to update parameter defaults.

If you run the command without specifying any parameters, you will get a warning and no file will be created.

EXAMPLES

Example 1

PS C:\> Set-PSFunctionInfoDefaults -Copyright "(c) JDH IT Solutions, Inc." -author "Jeff Hicks" -company "JDH IT Solutions, Inc."

PARAMETERS

-Author

Enter the default author name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CompanyName

Enter the default company name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Copyright

Enter the default copyright string.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Tags

Enter the default tag(s).

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Version

Enter the default version.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.String[]

OUTPUTS

None

NOTES

Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/

RELATED LINKS

Get-PSFunctionInfoDefaults

Update-PSFunctionInfoDefaults