Windows PowerShell is a powerful command-line shell and scripting language that allows you to automate tasks on your Windows computer. It is a versatile tool that can be used for a variety of tasks, including managing files and folders, configuring applications, and automating administrative tasks.One of the best ways to learn PowerShell is to use a cheat sheet. A cheat sheet is a quick reference guide that lists the most commonly used PowerShell commands and their syntax. This can be a great way to get started with PowerShell and to quickly look up the syntax of a command that you need to use.
There are many different PowerShell cheat sheets available online. Some of the most popular cheat sheets include:
- Windows PowerShell Cheat Sheet: https://www.theochem.ru.nl/~pwormer/teachmat/PS_cheat_sheet.html
- The Most Helpful PowerShell Cheat Sheet You'll Ever Find: https://www.stationx.net/powershell-cheat-sheet/
- PowerShell Cheat Sheet: Commands, Operators, and More for 2023: https://hackr.io/blog/powershell-cheat-sheet
Windows PowerShell Quiz Question and Answers
Read-Host cmdlet is used to ___________
- Read the host name
- Read the user name
- Prompt the name of the host
- Prompt the value of the variable interactively
In the following command, "-as secured string" is used to ___________.
- $ password=Read-host "Enter Your Password" -assecured string
- Hide the password
- Enter the password securely
- Prompt for the password
- Remove the password
When PowerShell 2.0 is updated with PowerShell 3.0, then ___________.
- None of the options
- PowerShell 2.0 will be replaced by PowerShell 3.0
- PowerShell 2.0 is left on the system
- PowerShell 2.0 cannot be updated with PowerShell 3.0
To get customized output, _________ cmdlet is used.
- Out-host
- Format-table
- Write-output
- Write-host
Shell is a _______ that is used to pass commands to the OS.
- cmd encoder
- cmd interpreter
- cmd decoder
- cmd counter
PowerShell for Ubuntu can be downloaded ____________.
- From the Arch user Repository
- As a Debian Package
- As an RPM Package
- It is available as a built-in tool
PowerShell variables are used to store _______.
- Environmental objects only
- Strings and Number objects
- Strings only
- Integers only
The default version of PowerShell in Windows 10 is __________.
- PowerShell 2.0
- PowerShell 3.0
- PowerShell 4.0
- PowerShell 5.0
Sort-Object cmdlet is used to _______.
- Perform action on each object
- Sort the list of objects based on the selected property
- Filter the objects from the list
- Display the list of objects based on the selected property
Write-host is used to _________.
- Display messages in the PowerShell console
- Display host data
- Customize the output format
- Display the output in the PowerShell console
Get-Variable cmdlet displays the list of ____________.
- Both Pre-defined and User-defined variables
- User-defined variables only
- Pre-defined variables only
- None of the options
The command to display the process name and ID of all processes is get-process ______.
- Both Select-Object and FT can be used
- FT Process name, ID
- Select-Object process name, ID (ans)
- None of the options
The open-source version of PowerShell is available from the year _______.
- 2002
- 2006
- 2010
- 2016
The PowerShell module can contain _______.
- File with .ps extension
- Cmdlets, providers, functions, variables that can be imported as a single unit
- Host application
- Session specific drivers
Error Action Preference specifies the desired behavior for ___________ in PowerShell.
- A terminating error
- Both terminating and non-terminating errors
- A non-terminating error
- None of the options
What will be the output for the following command Get-Process | Sort-Object -Property Handles | Select-Object -Last 5
- List of 5 processes having higher handles values
- List of all the processes
- List of 5 processes having lower handles values
- List of all processes sorted by "Handles"
Which is an equivalent PowerShell command for "ls"?
- Get-item
- Get-list
- Get-childitem
- None of the options
PowerShell commands are case insensitive.
- True
- False
What is the command to find the PowerShell version ___________.
- $PowerShell Version
- $PSVersion
- $PSVersiontable
- PSVersiontable
PowerShell commands are case sensitive.
- True
- False
The command(s) to display the examples of get-service is/are ____________.
- Get-help Get-service -detailed
- Get-help Get-service -examples
- Get-help Get-service -full
- All the options
The PowerShell command to view all the properties of a specific Process like "Notepad" is Get-Process notepad | Select-Object -Property *.
- True
- False
The open-source version of PowerShell contains a full set of commands.
- True
- False
How will the value of the variable "$name" be set in the following command?
- $ name=user1 Write-host "$name" User will be prompted to key in
- The value is already defined in the command
- The value will be set by default
- The value will be supplied through a script file
Integrated scripting environment is the ______ for PowerShell.
- Host application
- Add-on Application
- Open-source application
- Guest application
If $Name="User1" then the command $name.gettype() provides the information on___________
- Value of the variable
- Type of the variable value
- Both the options
- None of the options
PowerShell is a powerful tool that can be used to manage Windows computers and automate tasks. True or False
- True
- False
What is called a repository of PowerShell scripts and modules?
- PowerShell Gallery
- PowerShell ISE
- PowerShell subreddit
PowerShell ISE is a graphical PowerShell editor. True or False
- True
- False
Regular practice will help you learn the language PowerShell more quickly. True or False
- True
- False
Related Articles:
Check here for Azure PowerShell Use Cases