Explore tens of thousands of sets crafted by our community.
PowerShell Cmdlets
25
Flashcards
0/25
Get-ChildItem
Gets the items and child items in one or more specified locations. Example usage: Get-ChildItem -Path C:\Windows -Recurse
Set-Content
Writes or replaces the content of a file. Example usage: Set-Content -Path '.\example.txt' -Value 'New content'
Stop-Service
Stops one or more running services. Example usage: Stop-Service -Name 'bits' -Force
Get-Help
Displays help about PowerShell cmdlets and concepts. Example usage: Get-Help Get-Service
Get-Command
Gets all commands that are installed on the computer, including cmdlets, aliases, and functions. Example usage: Get-Command -Noun 'Service'
Get-Process
Gets the processes that are running on the local computer or a remote computer. Example usage: Get-Process -Name 'notepad'
ConvertFrom-Json
Converts a JSON-formatted string to an object. Example usage: '{"Name":"PowerShell"}' | ConvertFrom-Json
Set-ExecutionPolicy
Changes the user preference for PowerShell script execution policies. Example usage: Set-ExecutionPolicy RemoteSigned
Get-Content
Gets the content of a file. Example usage: Get-Content -Path '.\example.txt'
Stop-Process
Stops one or more running processes. Example usage: Stop-Process -Name 'notepad' -Force
ConvertTo-Json
Converts an object to a JSON-formatted string. Example usage: Get-Process | Select-Object -Property Name, CPU | ConvertTo-Json
Test-Path
Determines if a path to an item exists. Example usage: Test-Path -Path 'C:\Windows\notepad.exe'
Export-Csv
Exports objects to a CSV file. Example usage: Get-Process | Export-Csv -Path '.\processes.csv'
Select-Object
Selects specific properties of an object or set of objects. Example usage: Get-Service | Select-Object -Property Status, DisplayName
Set-Item
Changes the value of an item to the value specified in the command. Example usage: Set-Item -Path 'env:Path' -Value 'C:\Windows'
Start-Service
Starts one or more stopped services. Example usage: Start-Service -Name 'wuauserv'
Start-Process
Starts one or more processes on the local computer. Example usage: Start-Process -FilePath 'notepad.exe'
Import-Csv
Creates table-like custom objects from the items in a CSV file. Example usage: Import-Csv -Path '.\data.csv'
Out-File
Sends output to a file. Example usage: Get-Process | Out-File -FilePath 'processes.txt'
Remove-Item
Deletes one or more items. Example usage: Remove-Item -Path 'C:\temp\*.*' -Recurse
Get-Service
Gets the status of services on a local or remote machine. Example usage: Get-Service -Name 'bits'
Invoke-WebRequest
Sends HTTP and HTTPS requests to a web page or web service. Example usage: Invoke-WebRequest -Uri 'http://www.example.com'
Copy-Item
Copies an item from one location to another. Example usage: Copy-Item -Path '.\source.txt' -Destination '.\backup\source_backup.txt'
Get-Item
Gets the item at the specified location. Example usage: Get-Item -Path 'C:\Program Files'
Restart-Service
Restarts one or more stopped services. Example usage: Restart-Service -Name 'bits'
© Hypatia.Tech. 2024 All rights reserved.