Powershell MCQ Questions & Answers
Powershell MCQs : This section focuses on "Basics" of 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. Windows PowerShell is a ?
A. command-line shell
B. scripting language
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: Windows PowerShell is a command-line shell and scripting language designed especially for system administration. Its analogue in Linux is called as Bash Scripting.
2. Windows PowerShell commands, called?
A. cmdlets
B. parser
C. ISE
D. toggle breakpoint
View Answer
Ans : A
Explanation: Windows PowerShell commands, called cmdlets, let you manage the computers from the command line. Windows PowerShell providers let you access data stores, such as the Registry and Certificate Store, as easily as you access the file system.
3. Which of the following command is used to get child items in powershell?
A. Get-Child
B. Set-Alias
C. Get-Command
D. Get-ChildItem
View Answer
Ans : D
Explanation: Get-ChildItem is used to get the contents of a folder or registry key.
4. What is Powershell Scripting?
A. Type the commands in a text editor
B. Save the file with .ps1 extension
C. Execute the file in PowerShell
D. All of the above
View Answer
Ans : D
Explanation: All of the above true about Powershell Scripting.
5. The developer of Powershell is
A. Dell
B. Microsoft
C. HP
D. IBM
View Answer
Ans : B
Explanation: PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and the associated scripting language.
6. Point out the wrong statement.
A. Get-Command retrieve basic information about a command
B. Trace-Command trace an expression or command
C. Get-Content delete content from a file
D. None of the above
View Answer
Ans : C
Explanation: Clear-Content remove content from a file/item
7. In PowerShell ISE, ISE stands for?
A. Inline Scripting Environment
B. Integrated Shell Environment
C. Integrated Scripting Environment
D. None of the above
View Answer
Ans : C
Explanation: The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell.
8. ___________ convert object properties into CSV objects.
A. ConvertFrom-CSV
B. Convert-CSV
C. ConvertFromCSV
D. All of the above
View Answer
Ans : A
Explanation: ConvertFrom-CSV convert object properties (in CSV format) into CSV objects.
9. What are the types of format commands that can be used to Format data?
A. Format-Wide
B. Format-List
C. Format-Table
D. All of the above
View Answer
Ans : D
Explanation: All of the above are the types of format commands that can be used to Format data.
10. Point out the wrong statement.
A. The first PowerShell cmdlet every administrator should learn is Get-Command
B. Get-Event is used to find events in the PowerShell event queue
C. Limit-EventLog is used to limit the size of the event log
D. None of the above
View Answer
Ans : A
Explanation: The first PowerShell cmdlet every administrator should learn is Get-Help.You can use this command to get help with any other command.
Discussion