Automating Administration with Windows PowerShell Flashcards
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 or False?
True
If you want a PowerShell profile script to be loaded for All user and for both PowerShell console and PowerShell ISE, which profile script location and file name should you use?
$pshome
(C:\Windows\System32\WindowsPowerShell\v1.0)
Write 2 methods to monitor the use of Windows PowerShell on a computer.
Transcript logging, module logging, script logging
Both -in and -contains operators support exact match, partial match and pattern match. True or False?
False
What command do you use to protect a users password input?
Read-Host “enter password here” -AsSecureString
If the Powershell cannot run external commands, one solution is to use “stop parsing symbol”.
Write the “stop parsing symbol” syntax:
–%
Windows PowerShell 5.0 logs suspicious script blocks automatically, even if script block logging is not enabled.
True or False?
True
List 2 applications in windows OS that can interact with PowerShell.
Powershell and Powershell ISE
You wish to join multiple computers to the Adatum domain. The Add-Computer cmdlet’s -ComputerName parameter accepts multiple values. Which of the following is a set of valid values for this parameter?
-ComputerName LON-CL2,LON-CL3,LON-CL4
What is the difference between Get-Help and Get-Command?
Get help prints the commands documentation to screen where get command only lists available commands.
PowerShell is Microsoft product, so that we cannot use it to manage Linux and macOS computers. True or False?
False
Which of the following cmdlet verbs is not associated with the ADUser noun?
Get
Update
New
Remove
Set
update
The default value for the -protectedFromAccidentalDeletion parameter of New-ADOrganizationalUnit is $true. True of False?
false
Which two parameters can you use with *-NetIPAddress cmdlets to identify a network interface?
-InterfaceAlias and -InterfaceIndex
What Windows feature must you install before you can use Hyper-V cmdlets?
Hyper-V
Which Windows PowerShell cmdlets should you pipe output to when you want to return specified properties of an object?
Select-Object
Which Windows PowerShell cmdlets should you pipe output to descending order based on specific properties?
Sort-Object
List the 3 basic formatting commands.
Format-Wide, Format-List and Format-Table
Name two techniques for pipeline parameter binding.
ByValue and ByPropertyName
Both Windows Management Instrumentation (WMI) and Common Information Model (CIM) support local, session based connection and ad-hoc connection. True or False?
True
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 or False?
True
All repository classes are well documented. True or False
False
PSProviders are adapters that connect Windows Powershell to data stores. True or False?
True