PowerShell provides a wide range of commands to leverage PowerShell for various tasks. PowerShell scripting language is built on the .NET framework and designed for system administration, automation, and management tasks.
PowerShell commands cover a wide range of functionalities, including modules, automation tasks, manage session configuration, network drives, active directories, and so on…
In this article, we will explore a list of Windows PowerShell commands, cmdlet names, command alias, and description.
List of PowerShell Commands
Cmdlet Name | Command Alias | Command Description |
---|---|---|
Get-Help | man, help | Retrieves information about PowerShell commands. |
Show-Command | shcm | Generates PowerShell commands in a graphical command window. |
ForEach-Object | % | Executes an action on each object in a collection. |
Where-Object | ? | Filters objects from a collection based on their property values. |
Add-Content | ac | Appends data to a file. |
Get-Content | cat | Retrieves the content from a file. |
Clear-Content | clc | Removes the contents of an item without deleting the item itself. |
Set-Location | cd, chdir | Changes the current working location. |
Get-Location | pwd | Retrieves the current working location. |
Get-ChildItem | dir, ls | Lists files and directories in a file system drive. |
New-Item | ni | Generates a new item like a file or folder. |
Add-PSSnapIn | asnp | Integrates one or more PowerShell snap-ins into the current session. |
Get-Alias | gal | Retrieves the aliases for the current session. |
New-Alias | nal | Defines a new alias for a command in the current session. |
Compare-Object | compare, diff | Compares two sets of objects. One set is the reference, and the other is the difference. |
Group-Object | group | Displays objects in groups based on the value of the specific property. |
Copy-Item | copy, cp, cpi | Copies the item to a different specified location. |
Move-Item | mi, move, mv | Moves an item to another location. |
Invoke-Command | icm | Executes commands on local or remote computers. |
Invoke-Expression | iex | Invokes commands or expressions locally. |
Invoke-History | ihy, r | Executes commands from the session history. |
Import-CSV | ipcsv | Generates table-like custom objects from the items in the CSV file. |
Export-CSV | epcsv | Converts objects into comma-separated (CSV) strings and stores them in a CSV file. |
Get-Variable | gv | Retrieves variables in the current console. |
Set-Variable | set | Assigns a new value to a variable or creates a variable if it doesn’t exist. |
Get-Item | gi | Gets the item at the specified locations. |
Get-ItemProperty | gp | Gets the properties of the specified items. |
Get-ItemPropertyValue | gpv | Gets the value of one or more properties of a specified item. |
Get-Service | gsv | Retrieves the list of services on local or remote computers and displays it. |
Set-Service | ssv | Modifies the properties of a service. |
Start-Service | sasv | Starts one or more stopped services. |
Stop-Service | spsv | Stops one or more running services. |
Restart-Service | rsv | Stops and starts one or more services. |
Suspend-Service | susp | Suspends one or more running services. |
Invoke-Function | ifn | Invokes a function that is defined in the current session or script. |
Get-Acl | gacl | Retrieves the security descriptor for a resource, such as a file or a registry key. |
Set-Acl | sacl | Changes the security descriptor for a specified resource, such as a file or registry key. |
Register-ScheduledJob | rsjob | Registers a new scheduled job. |
Get-ScheduledJob | gsjob | Gets scheduled jobs on the local computer. |
Set-ScheduledJob | ssjob | Modifies the properties of a scheduled job. |
UnRegister-ScheduledJob | ursjob | Deletes a scheduled job. |
Start-ScheduledJob | sasjob | Starts a scheduled job immediately. |
Stop-ScheduledJob | spsjob | Stops a running scheduled job. |
Enable-ScheduledJob | easjob | Enables a scheduled job. |
Disable-ScheduledJob | disjob | Disables a scheduled job. |
Get-ScheduledJobOption | gsjopt | Gets the options that control the running of a scheduled job. |
Set-ScheduledJob | ssjopt | Modifies the options that control the running of a scheduled job. |
Get-JobTrigger | gjtr | Gets the triggers that are defined for a scheduled job. |
New-JobTrigger | njtr | Creates a new scheduled job trigger. |
Add-JobTrigger | ajtr | Adds a new trigger to a scheduled job. |
Remove-JobTrigger | rjtr | Removes a trigger from a scheduled job. |
Set-JobTrigger | sjtr | Modifies a scheduled job trigger. |
Get-Job | gjb | Gets the background jobs that were started in the current session. |
Receive-Job | rcjb | Gets the results of background jobs. |
Remove-Job | rmjb | Deletes a background job. |
Start-Job | stjb | Starts a background job. |
Stop-Job | spjb | Stops a background job. |
Wait-Job | wjb | Suppresses the command prompt until one or all jobs are complete. |
Conclusion
I hope the above article on PowerShell basic commands is helpful to you. PowerShell provides a wide range of commands to carry out various tasks.
Understanding the concepts and basics of PowerShell commands help you to enhance script efficiency and robustness.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.