PowerShell Variables MCQ Questions & Answers

PowerShell Variables MCQs : This section focuses on "Variables" in Powershell. These Multiple Choice Questions (MCQ) should be practiced to improve the Powershell skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.

1. Variables are the fundamental part of the Windows PowerShell.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


2. In Windows PowerShell, the name of a variable starts with the dollar?

A. @
B. #
C. &
D. $

View Answer


3. The name of the variables are?

A. case-sensitive
B. not case-sensitive
C. Both A and B
D. None of the above

View Answer


4. By default, the value of all the variables in a PowerShell is?

A. zero
B. empty
C. null
D. one

View Answer


5. If we use the special characters in the variable names, we will need to enclose them in the?

A. ()
B. []
C. {}
D. ||

View Answer


6. Is variable name $my-variable is valid?

A. Invalid variable names
B. Valid variable names
C. Can be A and B
D. Can not say

View Answer


7. We use an = operator to assign a specified value to the variable.

A. greater than
B. less than
C. dollar
D. equal to

View Answer


8. Which command is used to delete a variable?

A. delete-variable
B. drop-variable
C. cls-variable
D. clear-variable

View Answer


9. If you want to find the type of a variable, you can use the GetType() method.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


10. To display the value of a variable, type the name of a variable, followed by a dollar sign $.

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


11. Operators are the building blocks of the Windows PowerShell.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer





Discussion



* You must be logged in to add comment.