PowerShell Flashcards
(55 cards)
What is PowerShell?
PowerShell is a task automation and configuration management framework from Microsoft.
True or False: PowerShell is only available on Windows operating systems.
False
What command is used to display the current directory in PowerShell?
Get-Location or the alias pwd
Fill in the blank: The command to list all files in the current directory is ____.
Get-ChildItem
What is the file extension for PowerShell scripts?
.ps1
Which cmdlet is used to create a new directory?
New-Item
True or False: PowerShell cmdlets are case-sensitive.
False
What is the purpose of the ‘Pipeline’ in PowerShell?
To pass the output of one cmdlet as input to another cmdlet.
Which cmdlet would you use to get help about another cmdlet?
Get-Help
What does the ‘Select-Object’ cmdlet do?
It selects specific properties of an object.
True or False: You can use PowerShell to manage Azure resources.
True
What is a PowerShell module?
A package that contains PowerShell cmdlets, functions, variables, and more.
What command is used to import a module in PowerShell?
Import-Module
Fill in the blank: The command to remove a file is ____.
Remove-Item alias rm
What does the ‘Get-Process’ cmdlet do?
It retrieves a list of processes running on a machine.
Which command would you use to stop a running process?
Stop-Process
What is the purpose of the ‘Set-ExecutionPolicy’ cmdlet?
To change the user preference for the PowerShell script execution policy.
True or False: PowerShell supports both imperative and declarative programming styles.
True
What is a PowerShell ‘Alias’?
A shortcut or an alternative name for a cmdlet.
Which cmdlet is used to clear the console screen?
Clear-Host
What does the ‘Get-Service’ cmdlet do?
It retrieves the status of services on a machine.
Fill in the blank: The command to start a service is ____.
Start-Service
What is a PowerShell ‘Function’?
A block of code designed to perform a particular task.