-
-
Notifications
You must be signed in to change notification settings - Fork 7
Out Variable
apobekiaris edited this page Sep 4, 2020
·
4 revisions
Output a variable name and value into the verbose stream.
Out-Variable -VariableName <String> [-PassThrough] [-ForegroundColor <ConsoleColor>]
[-BackgroundColor <ConsoleColor>] [<CommonParameters>]
Out-Variable [-Variable <PSVariable>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>]
[<CommonParameters>]
Output a variable name and value into the verbose stream.
PS C:\> $VerbosePreference="continue"
PS C:\> $version=[Version]::parse("1.0.0.0")
PS C:\> Get-Variable version|Out-Variable
VERBOSE: version :1.0.0.0
Outputs the version variable into the verbose stream.
{{ Fill BackgroundColor Description }}
Type: ConsoleColor
Parameter Sets: (All)
Aliases: bg
Accepted values: Black, DarkBlue, DarkGreen, DarkCyan, DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Magenta, Yellow, White
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ForegroundColor Description }}
Type: ConsoleColor
Parameter Sets: (All)
Aliases: fg
Accepted values: Black, DarkBlue, DarkGreen, DarkCyan, DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Magenta, Yellow, White
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill PassThrough Description }}
Type: SwitchParameter
Parameter Sets: Name
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill Variable Description }}
Type: PSVariable
Parameter Sets: instance
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
{{ Fill VariableName Description }}
Type: String
Parameter Sets: Name
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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.