Introduction to PowerShell Commands
PowerShell Commands are useful in way more than one. Windows PowerShell is a command-line shell and we can also execute scripts on it. It is essential for System Administration tasks.
It is built on .NET framework and IT professional use it to automate their tasks. We can also run CMD commands in here like we are using CMD.
Commands with Get-
Get-Command – List all available commands in PowerShell
Get-Service – Lists information about the running services in the system.
Get-Help – It will provide a detailed explanation of a command which we give it.
Get-Process – Lists all the running processes in the system.
Get-ChildItem – Displays the content of a selected drive of folder.
Get-Drive – Gets the drive in a current session.
Get-PSBreakpoint – Gets the breakpoint that are set in the current session.
Get-Eventlog – Retreives the events which have occurred in your system.
Get-History – Get the history of executed commands from the log.
Get-Item – Gets file and folders.
Get-Variable – Gets the variable in the current console.
Get-Location – Gets information about the current working location or a location stack.
Get-Member – Get the properties or methods of a member.
Get-ItemProperty – Gets the properties of a specified item.
Commands with Set-
Set-Alias – Makes or changes an alias for a cmdlet or other command element.
Set-Location – Sets the current working location to a specified location.
Set-ExecutionPolicy – Changes the user preferences for Windows PowerShell execution policy.
Commands with New-
New-Alias – Creates a new alias.
New-PSDrive – Creates a new and persistent mapped network drive.
New-Item – Creates a new item.
New-Module – Creates a new dynamic module which exists only in memory.
New-Variable – Creates a new variable.
Commands with Clear-
Clear-History – Clears history from the PowerShell history log.
Clear-Content – Clears the content of an item but does not deletes the item.
Clear-Host – It clears the display of the terminal.
Clear-ItemProperty – Clears the content of the property but does not deletes the property.
Commands with Import-
Import-Alias – Imports an alias list from a file.
Import-Csv – It creates a table like object from the csv file.
Commands with Export-
Export-Alias – Exports the information about the current defined aliases to a file.
Export-Csv – Converts the object into series of comma separated values and exports them to a csv file.
Commands with Start-
Start-Service – Starts one or more stopped services.
Start-Job – Starts a PowerShell background Job.
Start-Process – It starts one or more processes in your computer.
Commands with Move-
Move-Item – Moves an item from one location to another location.
Move-ItemProperty – Moves a property of an item from one location to another location.
Commands with Format-
Format-Custom – It uses a customized view to format an output.
Format-Table – Format output as a table.
Commands with Out-
Out-File – Sends output to a file.
Out-Printer – Sends output to a printer.
Out-Host – Sends output to the command line.
Out-GridView – Sends output with interactive table view in separate window.
Remaining PowerShell Commands
convertTo-HTML – It Creates an HTML file from the PowerShell output.
Copy-Item – It copies a file to specific location
Remove-Item – Deletes the specified file or folder.
Disconnect-PSSession – Disconnects from a PowerShell Session.
Enter-PSSession – Starts an interactive session with a remote computer.
Exit-PSSession – Exists an interactive session with the remote computer.
powershell_ise.exe – It explains how to use powershell_ise.exe command line tool.
Invoke-History – Run commands from the session history.
Receive-Job – Get the result of a backgrount-task in current session.
Leave a Reply