
Explore tens of thousands of sets crafted by our community.
PowerShell Cmdlets
25
Flashcards
0/25




Get-Service




Gets the status of services on a local or remote machine. Example usage: Get-Service -Name 'bits'




Start-Process




Starts one or more processes on the local computer. Example usage: Start-Process -FilePath 'notepad.exe'




Start-Service




Starts one or more stopped services. Example usage: Start-Service -Name 'wuauserv'




Restart-Service




Restarts one or more stopped services. Example usage: Restart-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'




Get-Item




Gets the item at the specified location. Example usage: Get-Item -Path 'C:\Program Files'




Set-Content




Writes or replaces the content of a file. Example usage: Set-Content -Path '.\example.txt' -Value 'New content'




Test-Path




Determines if a path to an item exists. Example usage: Test-Path -Path 'C:\Windows\notepad.exe'




ConvertTo-Json




Converts an object to a JSON-formatted string. Example usage: Get-Process | Select-Object -Property Name, CPU | ConvertTo-Json




Get-Content




Gets the content of a file. Example usage: Get-Content -Path '.\example.txt'




Get-Process




Gets the processes that are running on the local computer or a remote computer. Example usage: Get-Process -Name 'notepad'




Get-Command




Gets all commands that are installed on the computer, including cmdlets, aliases, and functions. Example usage: Get-Command -Noun 'Service'




Remove-Item




Deletes one or more items. Example usage: Remove-Item -Path 'C:\temp\*.*' -Recurse




Copy-Item




Copies an item from one location to another. Example usage: Copy-Item -Path '.\source.txt' -Destination '.\backup\source_backup.txt'




Out-File




Sends output to a file. Example usage: Get-Process | Out-File -FilePath 'processes.txt'




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'




Get-ChildItem




Gets the items and child items in one or more specified locations. Example usage: Get-ChildItem -Path C:\Windows -Recurse




Select-Object




Selects specific properties of an object or set of objects. Example usage: Get-Service | Select-Object -Property Status, DisplayName




Stop-Service




Stops one or more running services. Example usage: Stop-Service -Name 'bits' -Force




Export-Csv




Exports objects to a CSV file. Example usage: Get-Process | Export-Csv -Path '.\processes.csv'




Import-Csv




Creates table-like custom objects from the items in a CSV file. Example usage: Import-Csv -Path '.\data.csv'




Set-ExecutionPolicy




Changes the user preference for PowerShell script execution policies. Example usage: Set-ExecutionPolicy RemoteSigned




Stop-Process




Stops one or more running processes. Example usage: Stop-Process -Name 'notepad' -Force




ConvertFrom-Json




Converts a JSON-formatted string to an object. Example usage: '{"Name":"PowerShell"}' | ConvertFrom-Json




Get-Help




Displays help about PowerShell cmdlets and concepts. Example usage: Get-Help Get-Service
© Hypatia.Tech. 2024 All rights reserved.