PowerShell - Basics and EnvironmentWhich of the following is the correct syntax to display the number 123 in PowerShell?AWrite-Output "123"BWrite-Output 123CWrite-Output (123)DWrite-Output [123]Check Answer
Step-by-Step SolutionSolution:Step 1: Check syntax for Write-Output with numbersWrite-Output can print numbers directly without quotes or brackets.Step 2: Evaluate each optionWrite-Output 123 uses Write-Output 123 which is correct syntax to print number 123.Final Answer:Write-Output 123 -> Option BQuick Check:Number without quotes prints correctly = B [OK]Quick Trick: Numbers print without quotes in Write-Output [OK]Common Mistakes:Putting numbers inside brackets or square bracketsUsing quotes unnecessarily for numbersConfusing parentheses as required syntax
Master "Basics and Environment" in PowerShell9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PowerShell Quizzes Cmdlets and Pipeline - Select-Object for properties - Quiz 8hard Cmdlets and Pipeline - Sort-Object for ordering - Quiz 14medium Cmdlets and Pipeline - ForEach-Object for iteration - Quiz 1easy Control Flow - Break and continue - Quiz 4medium Control Flow - ForEach loop - Quiz 13medium Operators - Comparison operators (-eq, -ne, -gt, -lt) - Quiz 11easy Operators - Comparison operators (-eq, -ne, -gt, -lt) - Quiz 12easy String Operations - Select-String for searching - Quiz 8hard Variables and Data Types - Boolean values - Quiz 10hard Variables and Data Types - Boolean values - Quiz 4medium