Skip to content

Out Variable

apobekiaris edited this page Sep 4, 2020 · 4 revisions

external help file: XpandPwsh-help.xml Module Name: XpandPwsh schema: 2.0.0

Out-Variable

SYNOPSIS

Output a variable name and value into the verbose stream.

SYNTAX

Name

Out-Variable -VariableName <String> [-PassThrough] [-ForegroundColor <ConsoleColor>]
 [-BackgroundColor <ConsoleColor>] [<CommonParameters>]

instance

Out-Variable [-Variable <PSVariable>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>]
 [<CommonParameters>]

DESCRIPTION

Output a variable name and value into the verbose stream.

EXAMPLES

Example 1

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.

PARAMETERS

-BackgroundColor

{{ 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

-ForegroundColor

{{ 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

-PassThrough

{{ Fill PassThrough Description }}

Type: SwitchParameter
Parameter Sets: Name
Aliases:

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

-Variable

{{ 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

-VariableName

{{ 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

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.Management.Automation.PSVariable

OUTPUTS

System.Object

NOTES

RELATED LINKS

image

image


Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally