Sei sulla pagina 1di 5

Powershell

**********
1). Alias name of the Format-table is _________.
Answer:
FT
FL
FC
FW

2).To get customized output _________ cmdlet is used ____________.


Answer:
write-output
out-host
format-table
write-host

3).PowerShell variables are used to store _______.


Answer:
Strings only
Environmental objects only
Integers Only
Strings & Number objects

4).PowerShell cmdlets performs system administration tasks such as managing


______________.
Answer:
Event logs
all the options
process and services
WMI & registry

5).Sort-Object cmdlet is used to _______.


Answer:
Filter the objects from the list
Display the list of objects based on the selected property
Sort the list f the object based on the selected property
Perform an action on each object

6).Write-host is used to ______.


Answer:
Display host data
customize the utput formart
display messages in the powershell console
display output in the powershell console

7).Integrated scripting environment is ______ for PowerShell.


Answer:
Host application
Add-on Application
Guest Application

8).To run ".PS1" files, the execution policy must be set to __________.
Answer:
Forced
Restricted
Remote Signed
Locally Signed
9).Error Action Preference specifies the desired behavior for ___________ in
PowerShell
Answer:
Both terminating and non-terminating errors
A terminating error
None of the options
a non terminating error

10).Variables starts with ______.


Answer:
"@"
"*"
"|"
"$"

11).PowerShell commands are case sensitive.


Answer:
False
True

12).In the command below, how will the value of the variable "$name" be set?
$ name=user1
Write-host "$name"
Answer:
Value will be supplied through a script file.
Value will be set by default
Value is already defined in the command
user will be prompted to key in

13).Command to display the examples of get-service ______________.


Answer:
Get-help Get-service -examples
Get-help Get-service -detailed
Get-help Get-service -full
All the options mentioned

14).Which of the version of .Net Frame work is required to install PowerShell


version 4?
Answer:
.Net Framework 4.5
All the options
.Net Framework 3.0
.Net Framework 4.0

15).Default version of PowerShell in Windows 10 is __________.


Answer:
PowerShell 2.0
PowerShell 3.0
PowerShell 4.0
PowerShell 5.0

16).Shell is _______ that is used to pass commands to the OS.


Answer:
cmd counter
cmd interpreter
cmd encoder
cmd decoder

17).Which is an equivalent PowerShell command for "ls"?


Answer:
Get-list
get-item
None of the options
get-childitem

18).PowerShell command to view all the properties of a specific Process like


"Notepad" is
Get-Process notepad | Select-Object -Property *.
Answer:
False
true

19).Pssession is ________.
Answer:
Created, Managed and closed by a user
Created, Managed and closed by a local system
Created, Managed and closed by an application
Created, Managed and closed automatically

20).Open source of PowerShell version is available from the year _______.


Answer:
2002
2010
2016
2006

21).Command to find the PowerShell Version is _____________.


Answer:
$PSVersion
$PowerShell Version
PSVersiontable
$PSVersiontable

22).ISE is available from _______.


Answer:
PowerShell 1.0
PowerShell 2.0
PowerShell 3.0
PowerShell 4.0

23).Package management module is available in ________.


Answer:
PowerShell 2.0
PowerShell 4.0
PowerShell 5.0
PowerShell 3.0

24).Command to display process name and ID of all process is get-process ______.


Answer:
Select-Object process name, ID
Both Select-Object and FT can be used
FT Process name, ID
None of mentioned
25).Read-Host cmdlet is used to ___________
Answer:
Prompt the name of the host
Read the user name
Prompt the value of the variable interactively
Read the Host name

26).Which of the following are Session Specific commands?


Answer:
Both Shell Function and Alias Commands
None of the options mentioned
Shell Function Commands
Alias Commands

27).PowerShell module can contain _______.


Answer:
cmd lets, providers,fuctions, variables that can be imported as a single unit.
sessions specific drivers
File with .PS extension
Host Application

28).If $Name="User1" then the command $name.gettype() provides the information


on___________?
Answer:
None of the options mentioned
Both of the options
value of the variable
type of the variable

29).In the following command, "-as secured string" is used to ___________.


$ password=Read-host "Enter Your Password" -assecured string
Answer:
To prompt for the Password
To enter the password securely
To hide the Password
To remove the Password

30).Open Source Version of PowerShell contains full set of commands.


Answer:
True
False

31).Get-Variable cmdlet displays the list of


Answer:
Pre-Defined Variables only
None of the options mentioned
Both Pre-Defined and User-Defined Variables
User-Defined Variables only

32).PowerShell for Ubuntu can be downloaded _______________.


Answer:
As a RPM Package
As a Debian Package
Available as a built in tool
From Arch user repository
33).To get customized output _________ cmdlet is used ____________.
Answer:
Out-host
Write-host
Write-output
format-table

34).The command Get-Process | Where-Object{$_.ProcessName -match "^p. *"} filters


the Processes by Process name and lists the Processes which
Answer:
contains the Alphabet "P"
lists all the Processes
starts with Alphabet "P"
ends with Alphabet "P"

Potrebbero piacerti anche