0% found this document useful (0 votes)
122 views7 pages

Comprehensive PowerShell Commands Guide

This document provides an A-Z index of common Windows PowerShell commands. It lists commands such as Get-Acl to get permission settings, Set-Acl to set permissions, Get-Alias to return alias names for cmdlets, and New-Alias to create a new alias. It also includes commands for managing files, folders, processes, jobs, events, formatting output, and more.

Uploaded by

ssprudhvi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views7 pages

Comprehensive PowerShell Commands Guide

This document provides an A-Z index of common Windows PowerShell commands. It lists commands such as Get-Acl to get permission settings, Set-Acl to set permissions, Get-Alias to return alias names for cmdlets, and New-Alias to create a new alias. It also includes commands for managing files, folders, processes, jobs, events, formatting output, and more.

Uploaded by

ssprudhvi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
  • PowerShell Commands: A-D
  • PowerShell Commands: E-H
  • PowerShell Commands: I-N
  • PowerShell Commands: O-P
  • PowerShell Commands: Q-S
  • PowerShell Commands: T-Z
  • Additional Resources

An A-Z Index of Windows PowerShell 2.

0
commands
a
Get-Acl Get permission settings for a file or registry
key
Set-Acl Set permissions
Active Directory Account, Computer, Group and User cmdlets
Get-Alias gal Return alias names for Cmdlets
Import-Alias ipal Import an alias list from a file
New-Alias nal Create a new alias.
Set-Alias sal Create or change an alias
Get-AuthenticodeSignature Get the signature object associated with a file
Set-AuthenticodeSignature Place a signature in a .ps1 script or other
file
c
Set-Location cd/chdir/sl Set the current working location
Get-ChildItem dir/ls/gci Get child items (contents of a folder or
registry key)
Clear-Host clear/cls Clear the screen
Clear-Item cli Remove content from a variable or an alias
Get-Command gcm Retrieve basic information about a command
Measure-Command Measure running time
Trace-Command Trace an expression or command
Add-Computer Add a computer to the domain
Checkpoint-Computer Create a system restore point (XP)
Remove-Computer Remove the local computer from a workgroup or
domain
Restart-Computer Restart the operating system on a computer
Restore-Computer Restore the computer to a previous state
Stop-Computer Stop (shut down) a computer
Reset-ComputerMachinePassword Reset the machine account password for the
computer
Test-ComputerSecureChannel Test and repair the secure channel to the
domain
Add-Content ac Add to the content of the item
Get-Content cat/type/gc Get content from item (specific location)
Set-Content sc Set content in the item (specific location)
Clear-Content clc Remove content from a file/item
Get-Command gcm Get basic information about cmdlets
Invoke-Command icm Run command
Enable-ComputerRestore Enable System Restore on a drive
Disable-ComputerRestore Disable System Restore on a drive
Get-ComputerRestorePoint Get the restore points on the local computer
Test-Connection Ping one or more computers
ConvertFrom-CSV Convert object properties (in CSV format) into
CSV objects
ConvertTo-CSV Convert .NET Framework objects into CSV
variable-length strings
ConvertTo-Html Convert the input into an HTML table
ConvertTo-Xml Convert the input into XML
ConvertFrom-SecureString Convert a secure string into an encrypted
standard string
ConvertTo-SecureString Convert an encrypted standard string into a
secure string
Copy-Item copy/cp/ci Copy an item from a namespace location
Export-Counter Export Performance Counter data to log files
Get-Counter Get performance counter data
Import-Counter Import performance counter log files
Get-Credential Get a security credential (username/password)
Get-Culture Get region information (language and keyboard
layout)
d
Get-ChildItem Dir/ls/gci Get child items (contents of a folder or
registry key)
Get-Date Get current date and time
Set-Date Set system time on the host system
Remove-Item Del/erase/rd/rm/rmdir Delete an item
Compare-Jbject diff/compare Compare the properties of objects
Do Loop while a condition is True
e
Get-Event Get events in the event queue
Get-WinEvent Get events from event logs and event trace logs
New-Event Create a new event
Remove-Event Delete events from the event queue
Unregister-Event Cancel an event subscription
Wait-Event Wait until a particular event is raised
Clear-EventLog Delete all entries from an event log
Get-Eventlog Get event log data
Limit-EventLog Limit the size of the event log
New-Eventlog Create a new event log and a new event source
Remove-EventLog Delete an event log
Show-EventLog Display an event log
Write-EventLog Write an event to an event log
Get-EventSubscriber Get event subscribers
Register-EngineEvent Subscribe to powershell events
Register-JbjectEvent Subscribe to .NET events
Register-WmiEvent Subscribe to a WMI event
Get-ExecutionPolicy Get the execution policy for the shell
Set-ExecutionPolicy Change the execution policy (user preference)
Export-Alias epal Export an alias list to a file
Export-Clixml Produce a clixml representation of powershell
objects
Export-Console Export console configuration to a file
Export-Csv epcsv Export to Comma Separated Values (spreadsheet)
Exit Exit Powershell (or exit a script)
f
ForEach-Jbject foreach Loop for each object in the pipeline ( % )
ForEach Loop through values in the pipeline
For Loop through items that match a condition
Format-Custom fc Format output using a customized view
Format-List fl Format output as a list of properties, each on
a new line
Format-Table ft Format output as a table
Format-Wide fw Format output as a table listing one property
only
Export-FormatData Save formatting data from the current session
Get-FormatData Get the formatting data in the current session
g
Get-Item gi Get a file/registry object (or any other
namespace object)
Get-ChildItem dir/ls/gci Get child items (contents of a folder or
registry key)
h
Get-Help help Jpen the help file
Add-History Add entries to the session history
Clear-History clhy Delete entries from the session history
Get-History history/h/ghy Get a listing of the session history
Invoke-History r/ihy Invoke a previously executed Cmdlet
Get-Host Get host information (PowerShell Version and
Region)
Clear-Host clear/cls Clear the screen
Read-Host Read a line of input from the host console
Write-Host Write customized output to the host/screen
Get-HotFix Get Installed hotfixes
i
if Conditionally perform a command
Import-Clixml Import a clixml file and rebuild the PS object
Import-Csv ipcsv Take values from a CSV list and send objects
down the pipeline
Invoke-Command Run commands on local and remote computers
Invoke-Expression iex Run a PowerShell expression
Get-Item gi Get a file object or get a registry (or other
namespace) object
Invoke-Item ii Invoke an executable or open a file (START)
New-Item ni Create a new item in a namespace
Remove-Item rm/del/erase/rd/ri/rmdir Remove an item
Set-Item si Change the value of an item
Clear-ItemProperty clp Remove the property value from a property
Copy-ItemProperty cpp Copy a property along with it's value
Get-ItemProperty gp Retrieve the properties of an object
Move-ItemProperty mp Move a property from one location to another
New-ItemProperty Set a new property
Remove-ItemProperty rp Remove a property and its value
Rename-ItemProperty rnp Renames a property at its location
Set-ItemProperty sp Set a property at the specified location to a
specified value
j
Get-Job gjb Get PowerShell background jobs that are running
Receive-Job rcjb Get PowerShell background job results
Remove-Job rjb Delete a PowerShell background job
Start-Job sajb Start a PowerShell background job
Stop-Job spjb Stop a PowerShell background job
Wait-Job wjb Wait for a background job
k
Stop-Process kill/spps Stop a running process
l
Update-List Add and remove items from a collection
Get-Location pwd / gl Get and display the current location
Pop-Location popd Set the current working location from the stack
Push-Location pushd Push a location to the stack
Set-Location cd/chdir/sl Set the current working location
m
Send-MailMessage Send an email message
Add-Member Add a member to an instance of a PowerShell
object
Get-Member gm Enumerate the properties of an object
Get-Module gmo Get the modules imported to the session
Import-Module ipmo Add a module to the session
New-Module nmo Create a new dynamic module (only in memory)
Remove-Module rmo Remove a module from the current session
Move-Item mv/move/mi Move an item from one location to another
o
Compare-Jbject diff/compare Compare the properties of objects
Group-Jbject group Group objects that contain the same value
Measure-Jbject Measure the properties of an object
New-Jbject Create a new .Net object
Select-Jbject select Select properties of objects
Sort-Jbject sort Sort objects by property value
Where-Jbject Filter the objects passed along the command
pipeline
Jut-Default Send output to default
Jut-File Send output to a file
Jut-GridView ogv Send output to an interactive table
Jut-Host oh Send output to the host
Jut-Null Send output to null
Jut-Printer lp Send the output to a printer
Jut-String Send objects to the host as strings
p
Powershell Launch a powershell session
Convert-Path cvpa Convert a ps path to a provider path
Join-Path Combine a path and child-path
Resolve-Path rvpa Resolves the wildcards in a path
Split-Path Return part of a path
Test-Path Return true if the path exists, otherwise
return false
Get-Pfxcertificate Get pfx certificate information
Pop-Location popd Set the current working location from the stack
Push-Location pushd Push a location to the stack
Get-Process ps/gps Get a list of processes on a machine
Debug-Process Attach a debugger to a running process
Start-Process start/saps Start one or more processes
Stop-Process kill/spps Stop a running process
Wait-Process Wait for a process to stop
Enable-PSBreakpoint ebp Enable a breakpoint in the current console
Disable-PSBreakpoint dbp Disable a breakpoint in the current console
Get-PSBreakpoint gbp Get the currently set breakpoints
Set-PSBreakpoint sbp Set a breakpoint on a line, command, or
variable
Remove-PSBreakpoint rbp Delete breakpoints from the current console
Get-PSDrive gdr Get drive information (DriveInfo)
New-PSDrive mount/ndr Install a new drive on the machine
Remove-PSDrive rdr Remove a provider/drive from its location
Get-PSProvider Get information for the specified provider
Set-PSdebug Turn script debugging on or off
Enter-PSSession etsn Start an interactive session with a remote
computer
Exit-PSSession exsn End an interactive session with a remote
computer
Export-PSSession epsn Import commands and save them in a PowerShell
module
Get-PSSession gsn Get the PSSessions in the current session
Import-PSSession ipsn Import commands from another session
New-PSSession nsn Create a persistent connection to a local or
remote computer
Remove-PSSession rsn Close PowerShell sessions
Disable-PSSessionConfiguration Deny access to PS session configuration
Enable-PSSessionConfiguration Enable PS session configuration
Get-PSSessionConfiguration Get the registered PS session
configuration
Register-PSSessionConfiguration Create and register a new PS session
configuration
Set-PSSessionConfiguration Change properties of a registered session
configuration
Unregister-PSSessionConfiguration Delete registered PS session
configuration
New-PSSessionJption Advanced options for a PSSession
Add-PsSnapIn asnp Add snap-ins to the console
Get-PsSnapin gsnp List PowerShell snap-ins on this computer
Remove-PSSnapin rsnp Remove PowerShell snap-ins from the console
q
Quest AD cmdlets Read and write to Active Directory
r
Get-Random Get a random number
Read-Host Read a line of input from the host console
Remove-Item rm/del/erase/rd/ri/rmdir Remove an item
Rename-Item ren/rni Change the name of an existing item
Rename-ItemProperty Rename a property of an item
Run/Call & Run a command (call operator)
s
Select-Jbject select Select properties of objects
Select-XML Find text in an XML string or document
Send-MailMessage Send an email message
Get-Service gsv Get a list of services
New-Service Create a new service
Restart-Service Stop and then restart a service
Resume-Service Resume a suspended service
Set-Service Change the start mode/properties of a service
Start-Service sasv Start a stopped service
Stop-Service spsv Stop a running service
Suspend-Service Suspend a running service
Sort-Jbject sort Sort objects by property value
Set-StrictMode Enforce coding rules in expressions & scripts
Start-Sleep sleep Suspend shell, script, or runspace activity
Switch Multiple if statements
ConvertFrom-StringData Convert a here-string into a hash table
Select-String Search through strings or files for patterns
t
Tee-Jbject tee Send input objects to two places
New-Timespan Create a timespan object
Trace-Command Trace an expression or command
Get-Tracesource Get components that are instrumented for
tracing.
Set-Tracesource Trace a PowerShell component
Start-Transaction Start a new transaction
Complete-Transaction Commit the transaction
Get-Transaction Get information about the active transaction
Use-Transaction Add a command or expression to the transaction
Undo-Transaction Roll back a transaction
Start-Transcript Start a transcript of a command shell session
Stop-Transcript Stop the transcription process
Add-Type Add a .NET Framework type to a PowerShell
session
Update-TypeData Update extended type configuration
u
Get-Uiculture Get the ui culture information
Get-Unique gu Get the unique items in a collection
Update-Formatdata Update and append format data files
Update-Typedata Update the current extended type configuration
v
Clear-Variable clv Remove the value from a variable
Get-Variable gv Get a powershell variable
New-Variable nv Create a new variable
Remove-Variable rv Remove a variable and its value
Set-Variable set/sv Set a variable and a value
w
New-WebServiceProxy Create a Web service proxy object
Where-Jbject where/. Filter input from the pipeline
Where Filter objects from the pipeline
While Loop while a condition is True
Write-Debug Write a debug message to the host display
Write-Error Write an object to the error pipeline
Write-Host Write customized output to the host/screen
Write-Jutput write/echo Write an object to the pipeline
Write-Progress Display a progress bar
Write-Verbose Write a string to the host's verbose display
Write-Warning Write a warning message
Set-WmiInstance Create or update an instance of an existing WMI
class
Invoke-WmiMethod iwmi Call WMI methods
Get-WmiJbject gwmi Get WMI class information
Remove-WmiJbject rwmi Delete an instance of a WMI class
Connect-WSMan Connect to the WinRM service on a remote
computer
Disconnect-WSMan Disconnect from the WinRM service on a remote
computer
Test-WSMan Test whether the WinRM service is running
Invoke-WSManAction Invoke an action on a specified object
Disable-WSManCredSSP Disable Credential Security Service Provider
(SSP) authentication
Enable-WSManCredSSP Enable Credential SSP authentication
Get-WSManCredSSP Get the Credential SSP configuration
New-WSManInstance Create a new instance of a management resource
Get-WSManInstance Display management information (XML or value)
Set-WSManInstance Modify the management information related to a
resource
Remove-WSManInstance Delete a management resource instance
Set-WSManQuickConfig Configure the local computer for remote
management
New-WSManSessionJption Jptions for WSMan commands
# Comment / Remark
. Alias for Where-Jbject
$variable = ";,:0" Define a variable also: $n!a#me = "value"
@(...) Force an expression to be evaluated as an array
The cmdlets on this page are listed in A-Z order, matching either the Jerb- or -Noun or Alias oI
the cmdlet (some are listed more than once).In addition to the above, Powershell can also run all
the standard CMD commands (apart Irom internal commands), plus VBScript and Resource kit
utilities.
Active Directory cmdlets
MicrosoIt: PowerShell 2.0 core and PowerShell Scripting help, Exchange 2010 cmdlets & SQL
Server 2008
Discussion Iorum
Links to other websites, books etc...

cu0001cu0002u0003u0001u0004u0005u0006u0007u0001b	u0001
u000bu0005bf
u0001u000ebfu0006u000fu0010u0011u0006u0012u0012u0001u0013u0014u0015u0001
u0016bu0017u0017u0018u0005
u0001
Ru0001u0002u0003u0004u0005u0006u0007u0001u0002u0003bu0002	
u000bffu000b
u000efu0002u0003u0003u000bu000eu000ffu0010
	Ru0010u000bu0007u0002
		u0002u000fu000bfu0003	u0011u0012u0002u0011u0013u0002u0003u0004u0005u0006u0007u0013u0002u0003bu0002	
u000bffu000b
u000efu0005u0006u0003u000bu0014u0002u0015
u0018
u000eu0014u0002	u0003+
u0004u0013u0002u0006u0016	u0002u0013u0003	u000bu000eu000fu0018
u000eu0014u0002	u0003Ru000eu0002u000eu0006	u0011bu0003u0002u0019fu0003Ru000eu0019R	u0019fu0003	u000bu000eu000fu000bu000eu0003
Rfu0002u0006u0016	u0002fu0003	u000bu000eu000fu0018
bu0011u0004u001cu0003u0002
u0006
bu0011&u0006b&u0006u000bu0018
bu0011Ru000eu000bu0003u0002
u0010	
Ru000eR
u0002fbRu0006u0002u0007
u0006Ru0003u000b
u000e.,b
u0001u0002u0003u0004u001cu0003u0002
u000fu000bu0001u0002u0003Ru0010u000bu0007u0002&	u0002u000fu000bfu0003	u0011
!"u0002u0006u0003'
	Ru000eu0011
u0003 u0002	u000eR
u0002fbRu0006u0002
!"u0002u0006u0003(u0001u0002u0003u0004u0018 u000bu0007u0019u001cu0003u0002
u0019u000b	&u0007f&u000fu0006u000bu0001u0002u0003u0006 u000bu0007u0019u000bu0003u0002
f'u0006
u000eu0003u0002u000eu0003f
u0010Ru0010
u0007u0019u0002	
		u0002u000fu000bfu0003	u0011u0012
u0001u0002u0003u0004*u0002
!u0002	u000f
.u000eu0016
u0002	Ru0003u0002u0003 u0002b	
bu0002	u0003u000bu0002f
u0010Ru000e
!"u0002u0006u0003u0001u0002u0003u0004*
u0019u0016u0007u0002u000f

u0001u0002u0003u0003 u0002

u0019u0016u0007u0002fu000b
b
	u0003u0002u0019u0003
u0003 u0002fu0002ffu000b
u000eu001c
b
	u0003u0004*
u0019u0016u0007u0002u000bb

u0005u0019u0019R

u0019u0016u0007u0002u0003
u0003 u0002fu0002
u001du0002u001eu0004#u0013u0013u0002ffu000b
u000eu000efu000eu0018	u0002Ru0003u0002Rbu0002	fu000bfu0003u0002u000eu0003u0006
u000eu000eu0002u0006u0003u000b
u000eu0003
Ru0007
u0006Ru0007
		u0002

u0003u0002u0006
bu0016u0003u0002	u001bu0002

u0014u0002u0004#u0013u0013u0002ffu000b
u000e	fu000eu0018u0007
fu0002#
u001eu0002	u0013 u0002u0007u0007fu0002ffu000b
u000efu0015u000bfR!u0007u0002u0004#u0013u0013u0002
u0013u0003
bu0004+	Ru000efu0006	u000bbu0003u0013u0003
bu0003 u0002u0003	Ru000efu0006	u000bbu0003u000b
u000eb	
u0006u0002ffu0005u0019u0019u0004+u0011bu0002u0005u0019u0019Ru001fu001d.+/	R
u0002u001e
	u0012u0003u0011bu0002u0003
R#
u001eu0002	u0013 u0002u0007u0007fu0002ffu000b
u000eu001abu0019Ru0003u0002u0004+u0011bu0002u0015Ru0003Ru001abu0019Ru0003u0002u0002,u0003u0002u000eu0019u0002u0019u0003u0011bu0002u0006
ãu0001u0002u0003u0004u0005u0006u0001u0007bu0002	
u0002u0007u000bbu0002f
u000eu0001u0002
u000fu0001u0002u0006u000bbu0007u0001u0005u0002u000b
u0002u0010u0011u0012u0002	u000fu0005u0001u000fu0013u0002u0004
u0007u0003u000b
u000eu0002u0001u000bu0007u0001u000fu0002u0007u0001u0002'u0001u0002u0003u0002	u000fu0002u0003u0004u0005u0006u0007u0002	u000fu0002b	
u000bf
	u0014u0002
u0007u0001u0002u0003u0004u0005u0006u0001u0007u0002u0015b	u0004u0001u0002
u000fu0001u0002u0006u000bbu0007u0001u0005u0002u0004	u000fu0001u0002u0007

You might also like