How would you display the value stored in a variable in PowerShell Console?
Group of answer choices
PS> $StoredValue
PS> PrintValue “$StoredValue”
PS> $StoredValue = Number
PS> $StoredValue -PrintOut
Answer :
PS> $StoredValue
Script and Output:
Why other options are incorrect to display stored value:
2) PS> PrintValue “$StoredValue” - Error : Unexpected token
'-PrintOut' in expression or statement.
3) PS> $StoredValue = Number - Error : Number : The term
'Number' is not recognized as the name of a cmdlet, function,
script file, or operable program.
4) PS> $StoredValue -PrintOut - Error : Unexpected token
'-PrintOut' in expression or statement.
Get Answers For Free
Most questions answered within 1 hours.