Google News
logo
PowerShell - Quiz(MCQ)
A)
IBM
B)
Google
C)
Apple
D)
Microsoft

Correct Answer :   Microsoft


Explanation : PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell.

A)
November 14, 2006
B)
November 14, 2005
C)
November 14, 2004
D)
November 14, 2003

Correct Answer :   November 14, 2006


Explanation : PowerShell version 1 was released on 26 September 2006, with final release to the web on 14 November 2006. PowerShell for earlier versions of Windows was released on 30 January 2007.

A)
Bill Gates
B)
Satya Nadella
C)
Jeffrey Snover
D)
Larry Ellison

Correct Answer :   Jeffrey Snover


Explanation : Jeffrey Snover is a Distinguished Engineer at Google. Previously a Microsoft Technical Fellow, PowerShell Chief Architect, and the Chief Architect for the Azure Infrastructure and Management group which includes Azure Stack, System Center and Operations Management Suite.

Snover is the inventor of Windows PowerShell, an object-based distributed automation engine, scripting language, and command line shell and was the chief architect for Windows Server.

A)
command-line shell
B)
scripting language
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)


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.

A)
ISE
B)
cmdlets
C)
parser
D)
toggle breakpoint

Correct Answer :   cmdlets


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.

A)
PSSC
B)
PSC1
C)
CLIXML
D)
All of the above

Correct Answer :   All of the above

A)
Select * from
B)
Select-String
C)
Select Object
D)
All of the above

Correct Answer :   All of the above

A)
Get-ChildItem
B)
Set-Alias
C)
Get-Child
D)
Get-Command

Correct Answer :   Get-ChildItem


Explanation : Get-ChildItem is used to get the contents of a folder or registry key.

A)
Execute the file in PowerShell
B)
Save the file with .ps1 extension
C)
Type the commands in a text editor
D)
All of the above

Correct Answer :   All of the above

A)
Modules
B)
PSSnapins
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)

A)
Czech language
B)
Multilingualism
C)
Turkish language
D)
None of the above

Correct Answer :   Multilingualism

A)
Parenthesis Brackets()
B)
Square Brackets[]
C)
Braces Brackets {}
D)
All of the above

Correct Answer :   All of the above

A)
Format-Wide
B)
Format-Table
C)
Format-List
D)
All of the above

Correct Answer :   All of the above

A)
Get-Content delete content from a file
B)
Trace-Command trace an expression or command
C)
Get-Command retrieve basic information about a command
D)
None of the above

Correct Answer :   Get-Content delete content from a file


Explanation : Clear-Content remove content from a file/item

A)
Integrated Shell Environment
B)
Inline Scripting Environment
C)
Integrated Scripting Environment
D)
None of the above

Correct Answer :   Integrated Scripting Environment


Explanation : The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell.

A)
Convert-CSV
B)
ConvertFrom-CSV
C)
ConvertFromCSV
D)
All of the above

Correct Answer :   ConvertFrom-CSV


Explanation : ConvertFrom-CSV convert object properties (in CSV format) into CSV objects.

A)
.NET Core
B)
.NET Framework
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Both (A) and (B)

A)
Windows 7
B)
macOS
C)
Windows Server 2008 R2
D)
All of the above

Correct Answer :   All of the above

A)
By typing "help *command*"
B)
By typing "help"
C)
By typing "*command* help"
D)
By typing "*command* options"

Correct Answer :   By typing "help *command*"

A)
draw-host
B)
write-host
C)
draw-output
D)
write-output

Correct Answer :   write-host

A)
By typing "help -full *command*"
B)
By typing "help - full
C)
By typing "*command* help -full"
D)
By typing "*command* options -full

Correct Answer :   By typing "help -full *command*"

A)
clear
B)
get-member
C)
powershell-directory
D)
get-location

Correct Answer :   get-location

A)
cls
B)
clear
C)
Both (A) and (B)
D)
clean

Correct Answer :   Both (A) and (B)

A)
integer
B)
array
C)
hash table
D)
All of the above

Correct Answer :   All of the above

A)
With parentheses surrounding the type of variable before the declaration (ie. "(integer) $variable"
B)
With square brackets surrounding the type of variable before the declaration (ie. "[integer] $variable"
C)
By stating that the variable equals the type of variable before declaring the actual variable (ie. "$variable=integer")
D)
You cannot declare the type of variable, powershell does this automatically when you declare the variable for the first time.

Correct Answer :   With square brackets surrounding the type of variable before the declaration (ie. "[integer] $variable"

A)
A whole number
B)
A decimal number
C)
An array of characters
D)
A string of characters

Correct Answer :   A whole number

A)
4
B)
2.36
C)
Hello world
D)
None of the above

Correct Answer :   2.36

28 .
What is the syntax for an if/elseif/else statement in powershell?
A)
If (condition) {output}

elseif (condition) {output}

else {output}
B)
If (condition) {output}

elseif (condition) {output}

else (condition) {output}
C)
If (condition) then {output}

elseif (condition) then {output}

else then {output}
D)
If (condition) then {output}

elseif (condition) then {output}

else then (condition) {output}

Correct Answer :  

If (condition) {output}

elseif (condition) {output}

else {output}

A)
This command doesn't exist
B)
This is a command used for decision making
C)
This is a command used for looping
D)
This is a command used to define variables

Correct Answer :   This is a command used for looping

A)
for {condition}
B)
for (condition) {output}
C)
for [init:condition] {output}
D)
for (init:condition:repeat) {output}

Correct Answer :   for (init:condition:repeat) {output}

A)
greater than
B)
get-everything
C)
less than or equal to
D)
greater than or equal to

Correct Answer :   greater than or equal to

A)
Create an [object] variable set to get-date
B)
Create a [datetime] variable set to get-date
C)
Create an [integer] variable set to get-date
D)
Create a [timespan] variable set to get-date

Correct Answer :   Create a [datetime] variable set to get-date

A)
by typing $variable.property
B)
by typing $variable=property
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   by typing $variable.property

A)
A whole number
B)
A decimal number
C)
A string of text
D)
A variable with multiple values with the first being indexed as 0 and the next as 1 and so on.

Correct Answer :   A variable with multiple values with the first being indexed as 0 and the next as 1 and so on.

A)
A whole number
B)
A string of text
C)
It is a variable with a Key-value pair
D)
A string of text associated with a number

Correct Answer :   It is a variable with a Key-value pair

A)
A whole number
B)
A decimal number
C)
A string of text
D)
A binary value of either true or false

Correct Answer :   A string of text

A)
.exe
B)
.ps1
C)
.ps2
D)
.pow

Correct Answer :   .ps1

A)
If/elseif/else statements
B)
If/then statements
C)
If/then/else statements
D)
None of the above

Correct Answer :   If/elseif/else statements

A)
By typing "gettype()"
B)
By typing "getmember()"
C)
By typing "$variable.getmember()"
D)
By typing "$variable.gettype()"

Correct Answer :   By typing "$variable.gettype()"

A)
gm
B)
get-member
C)
Both (A) and (B)
D)
gettype()

Correct Answer :   Both (A) and (B)

A)
output
B)
write-file
C)
write-output
D)
out-file

Correct Answer :   out-file

A)
By setting it to N/A
B)
By setting it to 0
C)
By typing "delete $variable"
D)
By setting it to null

Correct Answer :   By setting it to null

43 .
How can you change different parameters of a command output such as "write-host"?
A)
By typing "-*parameter*" after the command
B)
By typing "-*parameter*" before the command
C)
By typing ">>*parameter*" before the command
D)
By typing ">>*parameter*" after the command

Correct Answer :   By typing "-*parameter*" after the command