Powershell

Create an illustration of a PowerShell terminal with colorful charts and coding symbols around it, showcasing programming and IT concepts.

PowerShell Mastery Quiz

Test your knowledge of PowerShell with this comprehensive quiz designed for both beginners and experienced users. Strive to improve your scripting skills and understanding of cmdlets, parameters, and constructs in PowerShell.

  • 30 carefully crafted questions
  • Covers various aspects of PowerShell
  • Suitable for those preparing for certification or wanting to enhance their IT skills
54 Questions14 MinutesCreated by ScriptingMaster42
List 2 applications in windows OS that can interact with PowerShell.
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
-ComputerName “LON-CL2, LON-CL3, LON-CL4”
-ComputerName LON-CL2 LON-CL3 LON-CL4
-ComputerName LON-CL2, -ComputerName LON-CL3 -ComputerName LON-CL4
-ComputerName LON-CL2,LON-CL3,LON-CL4
What is the difference between Get-Help and Get-Command?
PowerShell v5.0 is open-source and supports Linux and macOS
True
False
Which of the following cmdlet verbs is not associated with the ADUser noun?
Get
Update
New
Remove
Set
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? (choose 2)
-InterfaceAlias
-AddressFamily
-DefaultGateway
-InterfaceIndex
What Windows feature must you install before you can use Hyper-V cmdlets?
Which Windows PowerShell cmdlets should you pipe output to when you want to return specified properties of an object?
Where-Object
Select-Object
Measure-Object
Sort-Object
Which Windows PowerShell cmdlets should you pipe output to descending order based on specific properties?
Where-Object
Select-Object
Measure-Object
Sort-Object
List the 3 Basic Formatting Commands
Which Powershell cmdlets are NOT correct? (Choose 2)
ConvertTo-CSV
Export-CSV
ConvertTo-CliXml
ConvertTo-JSON
Export-JSON
ConvertTo-HTML
Export-HTML
The following command is the most efficient way to produce a list of services that have names beginning with svc?

Get-Service | Where Name –like n*svc
True
False
Name two techniques for pipeline parameter binding?
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
All repository classes are well documented.
True
False
Name 3 Variable Types
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
What is the PowerShell script extension in PowerShell v5.0?
*.ps1
*.ps5
An Administrator creates a PowerShell script named process.ps1 and stores it in D:\

 

Why does administrator receive error when running it?

Name 3 Windows PowerShell cmdlets to import data in different formats for use in your scripts?
An organization 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.
Restricted
AllSigned
RemoteSigned
Unrestricted
ByPass
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
ForEach
If
Switch
For
Do..While
Adding comments and help documentation to your script make it easier for others to use
True
False
How to view the most recent error?
$Error
$Error[0]
$Error.New
A switch parameter has a value of $true or $false
True
False
When using Try..Catch construct to implement error handling, Finally section is optional.
True
False
Is it possible to use Try..Catch and provide different responses for different errors?
Yes
No
Is it possible to store credentials to disk for later reuse?
Yes
No
Compared to dot sourcing, which technology is better to use when referencing functions in multiple scripts?
Fill the blank.
 
____________ allow you to pause script processing and interact with the variables in the script.
For both non-terminating and terminating errors, you can use Try..Catch to display error messages in a friendly way.
True
False
When using PS Remoting, Administrator need enable PS Remoting on both local and remote computers.
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
Results received through remoting are static snapshot, don’t have methods or events.
True
False
Match the PS Feature to the correct description: It presents a persistently running connection on the remote computer
Implicit Remoting
PSSessions
$Using
Match the PS Feature to the correct description: Which is known as scope modifier, it’s used to identify a local variable in a remote command
Implicit Remoting
PSSessions
$Using
Match the PS Feature to the correct description: Administrators do not have to install administrative tools such as Windows PowerShell commands on their local computers.
Implicit Remoting
PSSessions
$Using
What are the 3 Types of Jobs?
Get-CIMInstance does have an –AsJob parameter?
True
False
When using Receive-Job to retrieve job results, you can use -keep to retain a copy of the results in memory. Otherwise, results are not retained in memory.
True
False
Select the 3 components of a scheduled job (select 3)
Job definition
Job actions
Job options
Job principals
Job triggers
Fill in the blank: The PS scheduled job results are stored in ___________
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
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)
$home\Documents\WindowsPowerShell
Profile.ps1
Microsoft.PowerShell_profile.ps1
Microsoft.PowerShellISE_profile.ps1
Write 2 methods to monitor the use of Windows PowerShell on a computer.
Both -in and -contains operators support exact match, partial match and pattern match.
True
False
Administrator wants to protect user’s password input as the following:
 
enter password here: *********

How does the administrator do this?

Read-Host “enter password here” -Encryption
Read-Host “enter password here” -AsSecureString
Read-Host “enter password here” -AsEncryptedString
Read-Host “enter password here” -AsProtectedString
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
False
{"name":"Powershell", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of PowerShell with this comprehensive quiz designed for both beginners and experienced users. Strive to improve your scripting skills and understanding of cmdlets, parameters, and constructs in PowerShell.30 carefully crafted questionsCovers various aspects of PowerShellSuitable for those preparing for certification or wanting to enhance their IT skills","img":"https:/images/course8.png"}
Powered by: Quiz Maker