NEW
Font size
WorksheetsMOC10961
Total questions: 76
Worksheet time: 3615secs
To interact with Powershell what are the two CLI interfacess , Microsoft provides
PowerShell console and PowerShell ISE
Powershell console and GUI
PowerShell ISE and scripting tool
All ofthe above
ISE offers two main panes. What are they?
Navigator pane and Object Pane
Object Pane and ISE
Console and Cmd
Console and scripting
Which of the following cmdlet verbs is not associated with the ADUser noun?
Get
SET
Update
New
The ----- cmdlet requires that you identify the user or users that you want to retrieve.
Get-ADUser
New-Ad user
Get-user
Add- user
Set-ADGroup command let you do?
Creates a new group
Modifies properties of a group
Displays properties of a group
Deletes a group
What is the structure of the PowerShell cmdlet?
Verb and simple tense
Noun and Simple Tense
Verb and ISE
Verb and noun
--------enables you to enter commands much faster and make your code less prone to errors,
Tab completion
Tab addition
Tab adjustment
All of the above
Select PowerShell Aliases from the options below
MKDIR
Where
Write
Where
Above
MKDIR
MKDIR,
Write
help
Write
read
help
In pipeline windows power shell use two techniques to pass the data
By data
By value
By Value
ByPropertyName
By Value
By int
By Value
By String
Select the PowerShell Active directory administration cmdlets from the list
a. Group
b. OU
c. User
a. user
b. OU
c. add
a. Group
b. Individual
c. OU
All of the options
Select the correct cmdlets to manager IIS
New-Website
Get-site
Get-site
Set Site
New-Website
Help site
New-Website
Stop-Website
What are the ways to send output to a file using PowerShell?
a) >
b) <<
a) Out-file
b) &&
a) &&
b) >>
a) Out-file
b) >>
Select comparison operators used in where -Object cmdlet?
a. -eq
b. -gt
c. -like
a. -eq
b. -lq
c. -gt
a. -lk
b. -make
c. -like
a. -eq
b. -lq
c. -make
Discovery of Object members includes.
a. Methods
b. Properties
C. Events
a. Methods
b. Scripts
c. Comments
a. Methods
b. Synonyms
c. Comments
a. Methods
b. functions
c. Comments
Select the correct built-in providers list
a) Alias
b) Variables
c) Registry
a) Email
b) Variables
c) Registry
a) Alias
b) Type
c) Registry
a) Alias
b) File system
c) Registry
Which of the variable type take either true or false
Bool
Int
Array
Array list
Which of these variable types cannot store decimal values?
Int
double
Var a
Var b
Select appropriate option to view a Data type of a variable
Variable.GetType()
Varible-GetType
Variable_GetType()
Get_type
Applocker is used to ?
Control the services
Control the script execution
Control the user input and output
Control the user print
Select the PowerShell function to get the current system date.
Sys-Date
Get-Date
Set-Data
New-data
Which lopping is better, if you are not bothered about number of items in the loop and number of times to loop?
For
FOREACH
IF else
Do while
Select one command that will loop until the condition is true
DO While
For loop
DO Until
Do Loop
Select 1 command used to collect user input
Write-Host
Read-Host
Collect-Host
Delete host
Select the 3 basic types of job triggers
a) Once
b) Fortnightly
c) Daily
a)Once
c) Daily
d)Atlogon
a) Once
b) week
c) monthly
a)Once
b) week
c) yearly
---------is an adapter that makes some data stores resemble hard drives within Windows PowerShell
Psp drive
usb
IIS
Provider
------ is a connection to a data store.
PS Driver
provider
File system
data system
What is the use of profile script?
Create
Create aliases
Create
aliases
Create aliases
Set Variables
set variable
get variable
Select the current User locations to load the profile scripts
$home
$MyDocuments
$PSHome
$Data
PowerShell Command to Delete results and the job object
Receive-job
add-job
Remove
Remove-Job
What is the command to view PowerShell Session.
View-Session
Get-PSSession
list-Session
Get-session
Command used to start remote jobs?
Start-Job –ScriptBlock
Invoke-Command –ScriptBlock
Remote-Job –ScriptBlock
Delete-Job –ScriptBlock
Job results are not retained in memory for future reference
True
False
which one is correct option to defend the script security threat
a). Install Antimalware and update
b). Install windows update in a timely manner
a). Install Antimalware and update
b). Delete antimalware
a). Add Antimalware
b). Install fireware
a). Install firewall
b). Install windows update
------cmdlet identifies the properties and methods that are available for a specific variable type
Get-Member
Get-data
add- member
Add-function
.\Scriptfile.ps1 syntax used to execute the PowerShell scripts
Absolute path
Full Path
Relative Path
Current path
Hash / table is based on an index and array is based on a key and a value
True
False
What is the command used to determine the version of windows PowerShell on a computer.
$PSVersionTable
$PSVer
$Version
RPC is the traditional method for remote management
True
False
AsSecureString is used to decrypt the user input?
False
Ture
What is the port numbers used in WINRM for the Https?
5986
6985
5985
6940
What is the port numbers used in WINRM for the http
5989
5985
5986
5978
The default type of array that Windows PowerShell creates is
Dynamic array
Fixed size array
local array
default array
Following command is used to convert a string to a secure string
$string | ConvertTo-SecureString -AsPlainText -Force
True
False
Profile script load automatically each time the host application starts?
True
False
Get-WmiObject command uses which protocol?
Remote Registry Service (RGS)
Remote Procedure Calls (RPC)
Remote Procedure enable (RPE)
Remote Registry call (RGC)
Remoting uses an open standard protocol called ?
WS-security
WS-Remote
Remote-access
WS-MAN
What is the PowerShell script extension in PowerShell v5.0?
a.
*.ps5
b.
*.ps1
c.
*.psm1
d.
*.psmd1
Administrator can create private modules to contain custom functions. One of the steps is to convert script file to module file. What is the extension of the module?
a.
*.xml
b.
*.psd1
c.
*.psm1
d.
*.psmd1
An organisation requires that downloaded PowerShell scripts must be signed by a trusted publisher before they can be run. However, scripts from the local computer don't need to be signed.
Which PowerShell execution policy should you set?
a.
Unrestricted
b.
RemoteSigned
c.
ByPass
Restricted
Break stops processing the current iteration of a loop, while Continue completely stops loop processing.
True
False
The ______________construct is used to run a script block a specific number of times based on the: Initial state; Condition and Action.
a.
ForEach
b.
Switch
c.
For
d.
If
How to view the most recent error?
By default, for both non-terminating and terminating errors, you can use Try..Catch to display error messages in a friendly way.
True
False
Which the following command is NOT correct to import data from files?
a.
Import-Clixml
b.
Import-Json
c.
c.
Get-Content
d.
Import-CSV
When using Try..Catch construct to implement error handling, Finally section is optional.
True
False
When using PS Remoting, Administrator need enable PS Remoting on both local and remote computers.
true
false
Results received through PS Remoting are static snapshot, don’t have all methods or events.
True
False
When using PS Remoting, the contents of the script block or file are transmitted as literal text to the remote computers.
True
False
Get-CIMInstance does have an –AsJob parameter.
True
False
When using Receive-Job to retrieve background job results, you can use -keep to retain a copy of the results in memory. Otherwise, results are not retained in memory.
True
False
True
False
The PS scheduled job definition and results are stored in ___________
a.
Memory
b.
Disk
Profile scripts are a Windows PowerShell feature that you can use to specify a list of commands that run every time you open a new Windows PowerShell session.
True
False
Administrator wants to grant “full control” to John Peter on C:\Test folder.
icacls.exe C:\Test /Grant “John Peter”:(F)
However, PowerShell cannot process this command successfully, since “icacls.exe” is an external command which contains preserved PowerShell characters.
How to correct this command to run it successfully?
icacls.exe --% C:\Test /Grant “John Peter”:(F)
icacls.exe --% C:\Test /Grant “John P”:(F)
icacls.exe % --C:\Test /Grant “John Peter”:(F)
All are correct
Which PowerShell logging method is suitable if you want PowerShell to log events for running cmdlets in specific modules?
a.
Module logging
b.
Script block logging
c.
Transcription logging
All of the above
Windows PowerShell 5.0 logs suspicious script blocks automatically, even if script block logging is not enabled.
true
false
PowerShell is Microsoft product, so that we cannot use it to manage Linux and macOS computers.
True
False
The default value for the -ProtectedFromAccidentalDeletion parameter of New-ADOrganizationalUnit is $true?
true
false
Which two parameters can you use with *-NetIPAddress cmdlets to identify a network interface?
a.
-InterfaceIndex
b.
-DefaultGateway
c.
-InterfaceAlias
d.
-AddressFamily
-InterfaceAlias and InterfaceIndex
InterfaceIndex and -DefaultGateway
-DefaultGateway and -AddressFamily
All of the above
Which Windows PowerShell cmdlets should you pipe output to when you want to return specified properties of an object?
a.
Select-Object
b.
Where-Object
c.
Measure-Object
d.
Sort-Object
Which Windows PowerShell cmdlets should you pipe output to descending order based on specific properties?
a.
Select-Object
b.
Where-Object
c.
Measure-Object
d.
Sort-Object
PSProviders are adapters that connect Windows PowerShell to data stores.
true
false
Both Windows Management Instrumentation (WMI) and Common Information Model (CIM) support local, session based connection and ad-hoc connection.
true
false
If you query a computer multiple times in a short period of time, a CIM session offers much better performance than an ad-hoc connection.
true
false
An array is a data structure that is designed to store a collection of items
true
false
Both Array and Arraylist support Add() and Remove() methods.
true
false
