Skip to main content

PowerShell command index

Microsoft PowerShell provides a wide range of commands. The command reference lists all commands, their syntax, and available parameters.
If you need help for a specific command, you can use the /? command-line switch to display a brief description of the command’s syntax and purpose.

attrib​

Displays or changes file attributes.

CategoryDescription
DescriptionDisplays or changes file attributes (read-only, archive, system, hidden, compressed).
Syntaxattrib [+ / - ] [rash] [<Drive:>][<Path>][<Filename>]
Parameters
<Drive> <Path> <Filename>Path and name of the file(s) to modify
+Sets attributes
-Clears attributes
rRead-only
aArchive
sSystem
hHidden

cd​

Displays the current directory or changes to another directory.

CategoryDescription
Syntaxcd [[<Drive:>]<Path> / .. ]
Without parametersDisplays the current drive and directory
<Drive> <Path>Changes to the specified directory
..Changes to the parent directory
ExampleC:\Windows>cd ..

cls​

Clears the screen.

CategoryDescription
Syntaxcls
ParametersNone

copy​

Copies one or more files to another location.

CategoryDescription
Syntaxcopy <Source> <Target>
<Source>File or files to copy
<Target>Destination path
Examplecopy C:\test D:\backup

del​

Deletes files.

CategoryDescription
Syntaxdel [<Drive:>][<Path>]<Filename>
Exampledel C:\test.txt

deltree​

Deletes a directory including subfolders.

CategoryDescription
Syntaxdeltree [<Drive:>]<Path>
Exampledeltree C:\Temp

device / service​

Starts the O&O DeviceManager.

CategoryDescription
Syntaxdevice / service
ParametersNone

dir​

Lists files and directories.

CategoryDescription
Syntaxdir [/p] [<Drive:>][<Path>][<Filename>]
/pDisplays output page by page
Exampledir /p

edlin​

Starts O&O Notepad.

CategoryDescription
Syntaxedlin
ParametersNone

exit​

Closes Microsoft PowerShell.

CategoryDescription
Syntaxexit
ParametersNone

help​

Lists all available commands.

CategoryDescription
Syntaxhelp
TipUse command /? for detailed help

info​

Displays file system and drive information.

CategoryDescription
Syntaxinfo { hdd / <Drive:> }
hddDisplays all drives
<Drive>Shows details for a specific drive

mkdir​

Creates a directory.

CategoryDescription
Syntaxmkdir [<Drive:>]<Path>
Examplemkdir C:\Data

passwd​

Changes or removes a user account password.

CategoryDescription
Syntaxpasswd <UserAccount> [<Password>]
Examplepasswd administrator test

rename​

Renames a file.

CategoryDescription
Syntaxrename [<Drive:>][<Path>]<Old> <New>
Examplerename test.txt test1.txt

rmdir​

Deletes a directory.

CategoryDescription
Syntaxrmdir [<Drive:>]<Path>

safeerase​

Securely deletes files, folders, or drives.

CategoryDescription
Syntaxsafeerase [options]
Security levels/highestsecurity … /lowestsecurity
Options/output, /verbose, /silent, /showdisks, /volume, /disk, /freespace, /y
Examplesafeerase /freespace C:

scopy​

Copies files while preserving NTFS permissions.

CategoryDescription
Syntaxscopy <Source> <Target>

type​

Displays the contents of a text file.

CategoryDescription
Syntaxtype [/p] [<Drive:>][<Path>]<Filename>
Exampletype C:\readme.txt

user​

Lists all local user accounts.

CategoryDescription
Syntaxuser
ParametersNone

ver​

Displays the PowerShell version.

CategoryDescription
Syntaxver

vmap​

Lists all mounted volumes and mappings.

CategoryDescription
Syntaxvmap

xcopy​

Copies files and folders recursively.

CategoryDescription
Syntaxxcopy [/e] [/s] <Source> <Target>
/eCopies empty subdirectories
/sPreserves NTFS attributes
Examplexcopy C:\Data D:\Backup /e