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.
| Category | Description |
|---|---|
| Description | Displays or changes file attributes (read-only, archive, system, hidden, compressed). |
| Syntax | attrib [+ / - ] [rash] [<Drive:>][<Path>][<Filename>] |
| Parameters | |
<Drive> <Path> <Filename> | Path and name of the file(s) to modify |
+ | Sets attributes |
- | Clears attributes |
r | Read-only |
a | Archive |
s | System |
h | Hidden |
cdβ
Displays the current directory or changes to another directory.
| Category | Description |
|---|---|
| Syntax | cd [[<Drive:>]<Path> / .. ] |
| Without parameters | Displays the current drive and directory |
<Drive> <Path> | Changes to the specified directory |
.. | Changes to the parent directory |
| Example | C:\Windows>cd .. |
clsβ
Clears the screen.
| Category | Description |
|---|---|
| Syntax | cls |
| Parameters | None |
copyβ
Copies one or more files to another location.
| Category | Description |
|---|---|
| Syntax | copy <Source> <Target> |
<Source> | File or files to copy |
<Target> | Destination path |
| Example | copy C:\test D:\backup |
delβ
Deletes files.
| Category | Description |
|---|---|
| Syntax | del [<Drive:>][<Path>]<Filename> |
| Example | del C:\test.txt |
deltreeβ
Deletes a directory including subfolders.
| Category | Description |
|---|---|
| Syntax | deltree [<Drive:>]<Path> |
| Example | deltree C:\Temp |
device / serviceβ
Starts the O&O DeviceManager.
| Category | Description |
|---|---|
| Syntax | device / service |
| Parameters | None |
dirβ
Lists files and directories.
| Category | Description |
|---|---|
| Syntax | dir [/p] [<Drive:>][<Path>][<Filename>] |
/p | Displays output page by page |
| Example | dir /p |
edlinβ
Starts O&O Notepad.
| Category | Description |
|---|---|
| Syntax | edlin |
| Parameters | None |
exitβ
Closes Microsoft PowerShell.
| Category | Description |
|---|---|
| Syntax | exit |
| Parameters | None |
helpβ
Lists all available commands.
| Category | Description |
|---|---|
| Syntax | help |
| Tip | Use command /? for detailed help |
infoβ
Displays file system and drive information.
| Category | Description |
|---|---|
| Syntax | info { hdd / <Drive:> } |
hdd | Displays all drives |
<Drive> | Shows details for a specific drive |
mkdirβ
Creates a directory.
| Category | Description |
|---|---|
| Syntax | mkdir [<Drive:>]<Path> |
| Example | mkdir C:\Data |
passwdβ
Changes or removes a user account password.
| Category | Description |
|---|---|
| Syntax | passwd <UserAccount> [<Password>] |
| Example | passwd administrator test |
renameβ
Renames a file.
| Category | Description |
|---|---|
| Syntax | rename [<Drive:>][<Path>]<Old> <New> |
| Example | rename test.txt test1.txt |
rmdirβ
Deletes a directory.
| Category | Description |
|---|---|
| Syntax | rmdir [<Drive:>]<Path> |
safeeraseβ
Securely deletes files, folders, or drives.
| Category | Description |
|---|---|
| Syntax | safeerase [options] |
| Security levels | /highestsecurity β¦ /lowestsecurity |
| Options | /output, /verbose, /silent, /showdisks, /volume, /disk, /freespace, /y |
| Example | safeerase /freespace C: |
scopyβ
Copies files while preserving NTFS permissions.
| Category | Description |
|---|---|
| Syntax | scopy <Source> <Target> |
typeβ
Displays the contents of a text file.
| Category | Description |
|---|---|
| Syntax | type [/p] [<Drive:>][<Path>]<Filename> |
| Example | type C:\readme.txt |
userβ
Lists all local user accounts.
| Category | Description |
|---|---|
| Syntax | user |
| Parameters | None |
verβ
Displays the PowerShell version.
| Category | Description |
|---|---|
| Syntax | ver |
vmapβ
Lists all mounted volumes and mappings.
| Category | Description |
|---|---|
| Syntax | vmap |
xcopyβ
Copies files and folders recursively.
| Category | Description |
|---|---|
| Syntax | xcopy [/e] [/s] <Source> <Target> |
/e | Copies empty subdirectories |
/s | Preserves NTFS attributes |
| Example | xcopy C:\Data D:\Backup /e |