external help file | Module Name | online version | schema |
---|---|---|---|
PSFunctionInfo-help.xml |
PSFunctionInfo |
2.0.0 |
Set PSFunctionInfo values.
Set-PSFunctionInfo [-FunctionName] <String> -Path <String> [-Version <String>] [-Author <String>] [-CompanyName <String>] [-Copyright <String>] [-Description <String>] [-Tags <String>] [-Source <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Normally, if you want to update an existing PSFunctionInfo metadata entry, you would do this while editing the file. However, you could use this command to make changes from the command prompt. If you want to remove a setting, use $Null as the parameter value. The LastUpdate value will be automatically updated to reflect the current date and time.
If you update the metadata, you won't see any changes until you manually reload the function into your PowerShell session.
. (Get-PSFunctionInfo Get-EventlogInfo).Source
PS C:\> Set-PSFunctionInfo -Name Get-EventlogInfo -Path c:\work\LogTools.ps1 -Tags "profile,eventlog" -Version "1.2.1"
Update PSFunctionInfo for the Get-EventlogInfo function in the specified file.
PS C:\> Set-PSFunctionInfo -Name Test-Eventlog -Path c:\work\LogTools.ps1 -Source $null
Clear the PSFunctionInfo Source value for the Test-Eventlog function.
Specify the new author.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the new company information.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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
Specify the new copyright information.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the new description. This should be a single line of text.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the name of a function that doesn't belong to a module.
Type: String
Parameter Sets: (All)
Aliases: Name
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Specify the .ps1 file that contains the function.
Type: String
Parameter Sets: (All)
Aliases: fullname
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specify the new Source.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the new tags as a comma-separated string. This will replace existing tags.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the new version number.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: https://jdhitsolutions.com/yourls/newsletter