Windows Commands and Their Syntax: A Comprehensive Guide

Windows Commands

Introduction to Windows Commands

All versions of Windows and Windows Server come with a built-in set of Win32 console commands. These commands help users automate various tasks using scripts or scripting tools, making system management more efficient.

Command-Line Shells in Windows

Windows provides two primary command-line environments: the Command Prompt (CMD) and PowerShell. Both serve as interfaces for executing commands and automating tasks, but they differ in capabilities and functionality.

1. Command Prompt (CMD)

CMD was the original command-line shell in Windows, primarily used for automating tasks such as user account management and backups through batch scripts (.bat files). The Windows Script Host further extended CMD’s capabilities by allowing more advanced scripting using cscript or wscript.

Although CMD remains useful, it is less powerful than PowerShell in terms of automation and scripting capabilities.

2. PowerShell

PowerShell was developed to provide a more advanced scripting environment than CMD. It introduces cmdlets—specialized commands that enhance automation and system management. Unlike CMD, PowerShell can execute both traditional Windows commands and cmdlets, making it the preferred choice for modern Windows automation.

For the most up-to-date and efficient Windows scripting, PowerShell is recommended over CMD or Windows Script Host.

Exit Codes and Error Handling in Windows Commands

Windows commands generate exit and error codes, which can help diagnose issues when a command fails. A detailed list of these system error codes is available in Windows documentation.

Command Redirection Operators

Windows supports command redirection operators, allowing users to redirect command output to files or other commands. Understanding these operators enhances efficiency when working with Windows commands.

Automatic File and Directory Name Completion in CMD

CMD offers an automatic file and directory name completion feature, which speeds up command execution. This feature is triggered using control characters (default: the Tab key). Users can modify these control characters by editing registry values:

  • For all users:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\CompletionChar
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\PathCompletionChar

These registry values are of type REG_DWORD and can be set using hexadecimal or decimal values. If you wish to disable a completion character, use the space key value (0x20).

Alternatively, file and directory name completion can be enabled or disabled per session by launching CMD with the following parameters:

  • Enable name completion: cmd.exe /F:ON
  • Disable name completion: cmd.exe /F:OFF

When enabled, the default shortcuts are:

  • Ctrl + D → Directory name completion
  • Ctrl + F → File name completion

User-specific settings override system-wide settings, and command-line parameters take precedence over registry configurations.

Finding Windows Commands by Name

Windows provides a vast set of commands for different operations. To find details about a specific command, navigate through the A-Z command reference and select the corresponding command name.

Windows Commands (A) with Syntax

1. active

Marks the selected partition as active, allowing it to be used as the system partition.
Syntax:

active

2. add

Adds a new entry to a list or configuration setting. Used in various contexts like firewall rules and policies.
Syntax:

add [options]

3. add alias

Creates an alias for a command in the Windows environment.
Syntax:

add alias  

4. add volume

Adds a volume to the system for storage management.
Syntax:

add volume 

5. adprep

Prepares an existing Active Directory environment for an upgrade to a newer version of Windows Server.
Syntax:

adprep /forestprep
adprep /domainprep
adprep /rodcprep

6. append

Enables programs to open files in a specified directory as if they were in the current directory.
Syntax:

append [drive:]path[;...]

7. arp (Address Resolution Protocol)

Displays and modifies the IP-to-MAC address translation table.
Syntax:

arp -a          # Displays the current ARP table
arp -d # Deletes an entry
arp -s # Manually adds an entry

8. assign

Assigns a drive letter to a volume.
Syntax:

assign [letter=]

9. assoc

Displays or modifies file associations (which program opens a file type).
Syntax:

assoc          # Lists all file associations
assoc .txt=Notepad.Document # Changes .txt file association

10. at

Schedules a command to run at a specified time (deprecated, use schtasks).
Syntax:

at 

11. atmadm

Displays ATM (Asynchronous Transfer Mode) call information.
Syntax:

atmadm -c

12. attach-vdisk

Attaches a virtual hard disk (VHD).
Syntax:

attach vdisk [readonly]

13. attrib

Changes file and folder attributes like read-only, hidden, or system.
Syntax:

attrib +r|-r +h|-h +s|-s 

14. attributes

Manages disk or volume attributes.
Syntax:

attributes  [options]

15. attributes disk

Modifies disk attributes like read-only or offline.
Syntax:

attributes disk set readonly
attributes disk clear readonly

16. attributes volume

Modifies volume attributes.
Syntax:

attributes volume set readonly
attributes volume clear readonly

17. auditpol

Manages auditing policies on a local or remote system.
Syntax:

auditpol /get /category:*

18. auditpol backup

Backs up the current audit policy settings.
Syntax:

auditpol /backup /file:

19. auditpol clear

Clears all current audit policy settings.
Syntax:

auditpol /clear

20. auditpol get

Retrieves and displays the current audit policy settings.
Syntax:

auditpol /get /subcategory:"Logon/Logoff"

21. auditpol list

Lists all audit policy settings.
Syntax:

auditpol /list /subcategory

22. auditpol remove

Removes specific audit policies.
Syntax:

auditpol /remove /subcategory:"Privilege Use"

23. auditpol resourcesacl

Manages security auditing policies for resource access.
Syntax:

auditpol /resourceSACL /set /type:File

24. auditpol restore

Restores audit policy settings from a backup file.
Syntax:

auditpol /restore /file:

25. auditpol set

Sets a new audit policy.
Syntax:

auditpol /set /subcategory:"Account Logon" /success:enable

26. autochk

Runs chkdsk automatically on startup if a disk error is detected.
Syntax:

autochk /?

27. autoconv

Converts FAT volumes to NTFS during system startup.
Syntax:

autoconv  /?

28. autofmt

Formats a partition automatically when needed.
Syntax:

autofmt  /?

29. automount

Manages automatic mounting of file systems.
Syntax:

automount enable
automount disable

Windows Commands (B) with Syntax

1. bcdboot

Used to create or repair the system partition’s boot files.
Syntax:
bcdboot [/s ] [/f ] [/c] [/l ]

2. bcdedit

Edits the Boot Configuration Data (BCD) store.
Syntax:
bcdedit /set {bootmgr} displaybootmenu yes

3. bdehdcfg

Configures hard drives for BitLocker Drive Encryption.
Syntax:
bdehdcfg -target

4. bdehdcfg driveinfo

Displays drive information related to BitLocker.
Syntax:
bdehdcfg -driveinfo

5. bdehdcfg newdriveletter

Assigns a new drive letter.
Syntax:
bdehdcfg -newdriveletter

6. bdehdcfg quiet

Suppresses output messages.
Syntax:
bdehdcfg -quiet

7. bdehdcfg restart

Restarts the system after configuration.
Syntax:
bdehdcfg -restart

8. bdehdcfg size

Specifies the partition size for BitLocker.
Syntax:
bdehdcfg -size

9. bdehdcfg target

Defines the target drive for BitLocker configuration.
Syntax:
bdehdcfg -target

10. begin backup

Initiates a backup process.
Syntax:
begin backup

11. begin restore

Initiates a restore process.
Syntax:
begin restore

12. bitsadmin

Manages Background Intelligent Transfer Service (BITS) jobs.
Syntax:
bitsadmin

13. bitsadmin addfile

Adds a file to a BITS transfer job.
Syntax:
bitsadmin /addfile

14. bitsadmin addfileset

Adds multiple files to a job.
Syntax:
bitsadmin /addfileset

15. bitsadmin addfilewithranges

Adds a file specifying byte ranges.
Syntax:
bitsadmin /addfilewithranges

16. bitsadmin cache

Manages the BITS cache.
Syntax:
bitsadmin /cache

17. bitsadmin cache and delete

Deletes cached BITS data.
Syntax:
bitsadmin /cache /delete

18. bitsadmin cache and deleteurl

Deletes a specific URL from the cache.
Syntax:
bitsadmin /cache /deleteurl

19. bitsadmin cache and getexpirationtime

Gets cache expiration time.
Syntax:
bitsadmin /cache /getexpirationtime

20. bitsadmin cache and getlimit

Gets the current cache size limit.
Syntax:
bitsadmin /cache /getlimit

21. bitsadmin cache and help

Displays help for cache commands.
Syntax:
bitsadmin /cache /help

22. bitsadmin cache and info

Shows cache information.
Syntax:
bitsadmin /cache /info

23. bitsadmin cache and list

Lists cache contents.
Syntax:
bitsadmin /cache /list

24. bitsadmin cache and setexpirationtime

Sets cache expiration time.
Syntax:
bitsadmin /cache /setexpirationtime

25. bitsadmin cache and setlimit

Sets cache size limit.
Syntax:
bitsadmin /cache /setlimit

26. bitsadmin cache and clear

Clears all cache data.
Syntax:
bitsadmin /cache /clear

27. bitsadmin cancel

Cancels a BITS job.
Syntax:
bitsadmin /cancel

28. bitsadmin complete

Completes a job and commits the files.
Syntax:
bitsadmin /complete

29. bitsadmin create

Creates a new BITS job.
Syntax:
bitsadmin /create

30. bitsadmin examples

Displays command examples.
Syntax:
bitsadmin /examples

31. bitsadmin getaclflags

Gets ACL flags for a job.
Syntax:
bitsadmin /getaclflags

32. bitsadmin getbytestotal

Gets total bytes for a job.
Syntax:
bitsadmin /getbytestotal

33. bitsadmin getbytestransferred

Shows transferred bytes.
Syntax:
bitsadmin /getbytestransferred

34. bitsadmin getclientcertificate

Gets the client certificate used in a job.
Syntax:
bitsadmin /getclientcertificate

35. bitsadmin getcompletiontime

Gets job completion time.
Syntax:
bitsadmin /getcompletiontime

36. bitsadmin getcreationtime

Gets job creation time.
Syntax:
bitsadmin /getcreationtime

37. bitsadmin getcustomheaders

Displays custom headers for a job.
Syntax:
bitsadmin /getcustomheaders

38. bitsadmin getdescription

Gets job description.
Syntax:
bitsadmin /getdescription

39. bitsadmin getdisplayname

Gets job display name.
Syntax:
bitsadmin /getdisplayname

40. bitsadmin geterror

Gets last error in a job.
Syntax:
bitsadmin /geterror

41. bitsadmin geterrorcount

Displays error count.
Syntax:
bitsadmin /geterrorcount

42. bootcfg

Modifies the boot configuration.
Syntax:
bootcfg

43. bootcfg addsw

Adds a switch to the boot configuration.
Syntax:
bootcfg /addsw /id /sw

44. bootcfg copy

Copies a boot entry.
Syntax:
bootcfg /copy /id

45. bootcfg dbg1394

Enables 1394 debugging.
Syntax:
bootcfg /dbg1394 /id

46. bootcfg debug

Enables debugging mode.
Syntax:
bootcfg /debug /id

47. bootcfg default

Sets the default boot entry.
Syntax:
bootcfg /default /id

48. bootcfg delete

Deletes a boot entry.
Syntax:
bootcfg /delete /id

49. bootcfg ems

Enables Emergency Management Services (EMS).
Syntax:
bootcfg /ems /id

50. bootcfg query

Displays the current boot settings.
Syntax:
bootcfg /query

51. bootcfg raw

Edits raw boot settings.
Syntax:
bootcfg /raw /id

52. bootcfg rmsw

Removes a switch from a boot entry.
Syntax:
bootcfg /rmsw /id

53. bootcfg timeout

Sets the boot menu timeout.
Syntax:
bootcfg /timeout

54. break

Used to enable or disable CTRL+C handling.
Syntax:
break [on|off]

Windows Commands (C) with Syntax

cacls – Displays or modifies access control lists (ACLs) of files.
Syntax: cacls filename [/t] [/e] [/c] [/g user:perm] [/r user] [/p user:perm]

call – Calls another batch script from within a script.
Syntax: call filename [arguments]

cd – Displays or changes the current directory.
Syntax: cd [drive:][path]

certreq – Requests, retrieves, accepts, or denies a certificate from a certificate authority.
Syntax: certreq -new request.inf request.req

certutil – Manages certificates, key pairs, and certificate stores.
Syntax: certutil [options]

change – Modifies terminal server settings.
Syntax: change logon /enable | /disable | /query

change logon – Enables or disables logons from Terminal Services.
Syntax: change logon [/enable | /disable | /query]

change port – Lists or changes COM port mappings for Terminal Services.
Syntax: change port COMx=COMy

change user – Changes user session mode for applications.
Syntax: change user /install | /execute | /query

chcp – Displays or sets the active code page number.
Syntax: chcp [nnn]

chdir – Alias for cd, used to change the directory.
Syntax: chdir [drive:][path]

chglogon – Similar to change logon, enables or disables logons.
Syntax: chglogon /enable | /disable | /query

chgport – Similar to change port, modifies COM port mappings.
Syntax: chgport COMx=COMy

chgusr – Similar to change user, modifies application installation mode.
Syntax: chgusr /install | /execute | /query

chkdsk – Checks a disk for errors and attempts to fix them.
Syntax: chkdsk [drive:] [/f] [/r] [/x]

chkntfs – Displays or modifies the automatic checking of disks at startup.
Syntax: chkntfs [drive:] /c | /x | /t:time

choice – Prompts the user to make a selection from a list of choices.
Syntax: choice /c [choices] /n /m [message]

cipher – Displays or alters file encryption status.
Syntax: cipher [/e | /d] [/s:dir]

clean – Removes all partitions from a disk.
Syntax: clean (Used inside Diskpart)

cleanmgr – Cleans unnecessary files from the disk.
Syntax: cleanmgr [/sageset:n | /sagerun:n]

clip – Copies output to the clipboard.
Syntax: command | clip

cls – Clears the command prompt screen.
Syntax: cls

cmd – Opens a new command prompt window.
Syntax: cmd [/c command | /k command]

cmdkey – Creates, lists, or deletes stored credentials.
Syntax: cmdkey /list | /add:targetname /user:username /pass:password

cmstp – Installs or removes a Connection Manager profile.
Syntax: cmstp [options]

color – Sets the text and background color of the command prompt.
Syntax: color [attr]

comp – Compares two files byte by byte.
Syntax: comp file1 file2

compact – Displays or modifies NTFS file compression.
Syntax: compact [/c | /u] [/s:dir]

compact vdisk – Reduces the physical size of a virtual disk.
Syntax: compact vdisk (Used in Diskpart)

convert – Converts a file system or disk format.
Syntax: convert drive: /fs:ntfs

convert basic – Converts a dynamic disk back to basic.
Syntax: convert basic (Used in Diskpart)

convert dynamic – Converts a basic disk to a dynamic disk.
Syntax: convert dynamic (Used in Diskpart)

convert gpt – Converts a disk to GPT partition style.
Syntax: convert gpt (Used in Diskpart)

convert mbr – Converts a disk to MBR partition style.
Syntax: convert mbr (Used in Diskpart)

copy – Copies files from one location to another.
Syntax: copy source destination

create – Used to create partitions or volumes in Diskpart.
Syntax: create partition primary

create partition efi – Creates an EFI system partition.
Syntax: create partition efi size=n

create partition extended – Creates an extended partition.
Syntax: create partition extended size=n

create partition logical – Creates a logical partition within an extended partition.
Syntax: create partition logical size=n

create partition msr – Creates a Microsoft Reserved (MSR) partition.
Syntax: create partition msr size=n

create partition primary – Creates a primary partition.
Syntax: create partition primary size=n

create volume mirror – Creates a mirrored volume.
Syntax: create volume mirror disk=n

create volume raid – Creates a RAID-5 volume.
Syntax: create volume raid disk=n,n,n

create volume simple – Creates a simple volume.
Syntax: create volume simple size=n disk=n

create volume stripe – Creates a striped volume.
Syntax: create volume stripe size=n disk=n,n

cscript – Runs VBScript and JScript scripts.
Syntax: cscript scriptname.vbs [options]

Windows Commands (D) with Syntax

date – Displays or sets the system date.
Syntax: date [/T | new_date]

dcdiag – Analyzes the state of domain controllers in a forest or enterprise.
Syntax: dcdiag /test:[TestName]

dcgpofix – Restores the default Group Policy objects.
Syntax: dcgpofix [/target:Domain | DC | Both]

dcpromo – Promotes a server to a domain controller or demotes it.
Syntax: dcpromo /unattend:filename

defrag – Defragments a disk.
Syntax: defrag [drive:] [/C] [/X] [/H]

del – Deletes one or more files.
Syntax: del [drive:][path]filename [/F] [/S] [/Q]

delete – Used in Diskpart to remove a partition, volume, or disk.
Syntax: delete partition | volume | disk

delete disk – Deletes a specified disk from Disk Management.
Syntax: delete disk (Used in Diskpart)

delete partition – Deletes a specified partition from a disk.
Syntax: delete partition (Used in Diskpart)

delete shadows – Deletes shadow copies.
Syntax: delete shadows [/all | /shadow=ID]

delete volume – Deletes a specified volume from Disk Management.
Syntax: delete volume (Used in Diskpart)

detach vdisk – Detaches a virtual disk.
Syntax: detach vdisk (Used in Diskpart)

detail – Displays detailed information about an object in Diskpart.
Syntax: detail disk | volume | partition | vdisk

detail disk – Displays details about a selected disk.
Syntax: detail disk (Used in Diskpart)

detail partition – Displays details about a selected partition.
Syntax: detail partition (Used in Diskpart)

detail vdisk – Displays details about a selected virtual disk.
Syntax: detail vdisk (Used in Diskpart)

detail volume – Displays details about a selected volume.
Syntax: detail volume (Used in Diskpart)

dfsdiag – Diagnoses issues in DFS (Distributed File System).
Syntax: dfsdiag /test:[option]

dfsdiag testdcs – Tests domain controllers for DFS configuration.
Syntax: dfsdiag /testdcs [/domain:DomainName]

dfsdiag testdfsconfig – Validates DFS configuration.
Syntax: dfsdiag /testdfsconfig [/domain:DomainName]

dfsdiag testdfsintegrity – Checks DFS metadata consistency.
Syntax: dfsdiag /testdfsintegrity [/domain:DomainName]

dfsdiag testreferral – Tests DFS referral responses.
Syntax: dfsdiag /testreferral /target:\\DFSPath

dfsdiag testsites – Tests DFS site settings.
Syntax: dfsdiag /testsites

dfsrmig – Manages DFS replication migration.
Syntax: dfsrmig /setglobalstate [0|1|2|3]

diantz – Compresses files into cabinet (.cab) format.
Syntax: diantz [/options] source [destination]

dir – Displays a list of files and directories.
Syntax: dir [drive:][path] [/A] [/B] [/C]

diskcomp – Compares the contents of two floppy disks.
Syntax: diskcomp [drive1: drive2:]

diskcopy – Copies the contents of one floppy disk to another.
Syntax: diskcopy [drive1: drive2:]

diskpart – A command-line disk management tool.
Syntax: diskpart (Opens Diskpart CLI)

diskperf – Monitors disk performance counters.
Syntax: diskperf -y | -n

diskraid – Configures RAID arrays from the command line.
Syntax: diskraid

diskshadow – Manages shadow copies of volumes.
Syntax: diskshadow (Opens Diskshadow CLI)

dispdiag – Collects display diagnostics.
Syntax: dispdiag [/q | /t]

dnscmd – Manages DNS servers.
Syntax: dnscmd [Server] /[Command]

doskey – Edits command lines, recalls commands, and creates macros.
Syntax: doskey [/history | /macros]

driverquery – Displays a list of installed drivers.
Syntax: driverquery [/FO format] [/SI]

dtrace – Used for system-wide tracing on Windows.
Syntax: dtrace -n "probe description"

Windows Commands (E) with Syntax

echo – Displays messages or enables/disables command echoing.
Syntax: echo [on | off | message]

edit – Opens the MS-DOS text editor.
Syntax: edit [filename]

endlocal – Ends localization of environment changes in a batch file.
Syntax: endlocal

end restore – Ends a system restore operation.
Syntax: end restore (Used in recovery mode)

erase – Deletes one or more files.
Syntax: erase [drive:][path]filename [/F] [/S] [/Q]

eventcreate – Creates a custom event log entry.
Syntax: eventcreate /ID ID /L logname /T type /SO source /D description

Evntcmd – Configures event sources in event logs.
Syntax: Evntcmd [/options] scriptfile

exec – Executes a program or script.
Syntax: exec [program] [arguments]

exit – Exits the command prompt or script.
Syntax: exit [/B] [exitCode]

expand – Extracts files from compressed .cab files.
Syntax: expand [-r] source destination

expand vdisk – Expands the size of a virtual disk.
Syntax: expand vdisk maximum=size (Used in Diskpart)

expose – Exposes a hidden volume.
Syntax: expose [volume]

extend – Extends a partition or volume.
Syntax: extend [size=n] (Used in Diskpart)

extract – Extracts files from a compressed archive.
Syntax: extract [/Y] source [destination]

Windows Commands (F) with Syntax

fc – Compares two files and displays the differences.
Syntax: fc [options] file1 file2

filesystems – Displays supported file systems.
Syntax: filesystems (Used in Diskpart)

find – Searches for a specific text string in a file.
Syntax: find "text" filename

findstr – Searches for a string using advanced options.
Syntax: findstr [options] "text" filename

finger – Displays information about users on a remote system.
Syntax: finger [username]@[host]

flattemp – Manages temporary files in a flat namespace.
Syntax: flattemp [on | off]

fondue – Enables optional Windows features.
Syntax: fondue /enable-feature:FeatureName

for – Runs a command for each file in a set.
Syntax: for %variable in (set) do command

forfiles – Selects files and executes a command on them.
Syntax: forfiles /P path /M pattern /C "command"

format – Formats a disk for use with Windows.
Syntax: format drive: /FS:file-system

freedisk – Checks free space on a disk.
Syntax: freedisk drive:

fsutil – Manages file system behavior.
Syntax: fsutil [operation] [parameters]

fsutil 8dot3name – Manages short (8.3) filenames.
Syntax: fsutil 8dot3name [query | set]

fsutil behavior – Changes file system behavior settings.
Syntax: fsutil behavior set parameter value

fsutil devdrv – Manages device drivers.
Syntax: fsutil devdrv [command]

fsutil dirty – Checks or sets a volume’s dirty bit.
Syntax: fsutil dirty query drive:

fsutil file – Manages files.
Syntax: fsutil file [operation] [parameters]

fsutil fsinfo – Displays file system information.
Syntax: fsutil fsinfo [query]

fsutil hardlink – Creates or manages hard links.
Syntax: fsutil hardlink create newfile existingfile

fsutil objectid – Manages object IDs.
Syntax: fsutil objectid [query | delete | set]

fsutil quota – Manages disk quotas.
Syntax: fsutil quota [track | enforce] drive:

fsutil repair – Repairs file system issues.
Syntax: fsutil repair [query | set]

fsutil reparsepoint – Manages reparse points.
Syntax: fsutil reparsepoint query path

fsutil resource – Manages transactional resource manager.
Syntax: fsutil resource [query | set]

fsutil sparse – Manages sparse files.
Syntax: fsutil sparse [setflag | queryflag]

fsutil tiering – Manages storage tiering.
Syntax: fsutil tiering [query | set]

fsutil transaction – Manages NTFS transactions.
Syntax: fsutil transaction [command]

fsutil usn – Manages update sequence numbers (USN).
Syntax: fsutil usn [query | deletejournal]

fsutil volume – Manages volumes.
Syntax: fsutil volume [query | dismount] drive:

fsutil wim – Manages Windows Imaging Format (WIM).
Syntax: fsutil wim [command]

ftp – Transfers files between systems over FTP.
Syntax: ftp [options] [hostname]

ftp append – Appends data to a file.
Syntax: ftp append localfile remoteFile

ftp ascii – Sets ASCII transfer mode.
Syntax: ftp ascii

ftp bell – Toggles sound on completion.
Syntax: ftp bell

ftp binary – Sets binary transfer mode.
Syntax: ftp binary

ftp bye – Closes FTP session.
Syntax: ftp bye

ftp cd – Changes the directory on the remote system.
Syntax: ftp cd directory

ftp close – Closes the FTP connection.
Syntax: ftp close

ftp debug – Toggles debugging mode.
Syntax: ftp debug

ftp delete – Deletes a file from the remote server.
Syntax: ftp delete filename

ftp dir – Lists files on the remote server.
Syntax: ftp dir [remote-directory]

ftp disconnect – Disconnects from the remote server.
Syntax: ftp disconnect

ftp get – Downloads a file.
Syntax: ftp get remote-file [local-file]

ftp glob – Enables or disables wildcard expansion.
Syntax: ftp glob

ftp hash – Displays hash marks during transfers.
Syntax: ftp hash

ftp lcd – Changes the local working directory.
Syntax: ftp lcd directory

ftp literal – Sends a command directly to the FTP server.
Syntax: ftp literal command

ftp ls – Lists directory contents.
Syntax: ftp ls [directory]

ftp mget – Downloads multiple files.
Syntax: ftp mget files

ftp mkdir – Creates a directory on the remote server.
Syntax: ftp mkdir directory

ftp mls – Lists multiple remote files.
Syntax: ftp mls files

ftp mput – Uploads multiple files.
Syntax: ftp mput files

ftp open – Connects to an FTP server.
Syntax: ftp open hostname

ftp prompt – Toggles interactive mode.
Syntax: ftp prompt

ftp put – Uploads a file to the server.
Syntax: ftp put localfile remotefile

ftp pwd – Displays the current remote directory.
Syntax: ftp pwd

ftp quit – Exits FTP.
Syntax: ftp quit

ftp quote – Sends a raw FTP command.
Syntax: ftp quote command

ftp recv – Downloads a file (same as get).
Syntax: ftp recv remote-file [local-file]

ftp remotehelp – Displays FTP server help.
Syntax: ftp remotehelp

ftp rename – Renames a file on the server.
Syntax: ftp rename oldname newname

ftp rmdir – Removes a remote directory.
Syntax: ftp rmdir directory

ftp send – Uploads a file (same as put).
Syntax: ftp send localfile remotefile

ftp status – Displays FTP status.
Syntax: ftp status

ftp trace – Enables packet tracing.
Syntax: ftp trace

ftp type – Displays or sets transfer mode.
Syntax: ftp type [ascii | binary]

ftp user – Logs into the FTP server.
Syntax: ftp user username

ftp verbose – Toggles verbose mode.
Syntax: ftp verbose

ftp mdelete – Deletes multiple files.
Syntax: ftp mdelete files

ftp mdir – Lists multiple remote directories.
Syntax: ftp mdir directories

ftype – Displays or modifies file types.
Syntax: ftype [fileType[=openCommand]]

fveupdate – Updates BitLocker feature set.
Syntax: fveupdate

Windows Commands (G) with Syntax

getmac – Displays the MAC addresses of network adapters.
Syntax:
getmac /v /fo table

gettype – Not a standard Windows command. It may refer to a script or a third-party tool.

goto – Directs batch processing to a labeled line.
Syntax:

goto label
...
:label
command

gpfixup – Used to repair domain-related issues after renaming a domain.
Syntax:
gpfixup /olddns:OldDomain /newdns:NewDomain

gpresult – Displays Group Policy settings for a user or computer.
Syntax:
gpresult /h report.html

gpt – Not a standalone command in Windows CLI but refers to GUID Partition Table in disk management.

gpupdate – Updates Group Policy settings.
Syntax:
gpupdate /force

graftabl – Enables Windows to display extended characters in graphics mode.
Syntax:
graftabl [codepage]

Windows Commands (H) with Syntax

help – Displays information about available commands.
Syntax:
help [command]

helpctr – Opens the Help and Support Center (older Windows versions).
Syntax:
helpctr

hostname – Displays the computer’s hostname.
Syntax:
hostname

Windows Commands (I) with Syntax

icacls – Modifies file and folder permissions.
Syntax:
icacls filename /grant User:F

if – Performs conditional operations in batch scripts.
Syntax:

if condition (command) else (command)

import (shadowdisk) – Imports a shadow copy set.
Syntax:
import setID

import (diskpart) – Imports a foreign disk group.
Syntax:
diskpart import diskgroup

inactive – Marks a partition as inactive.
Syntax:
inactive

ipconfig – Displays network configuration details.
Syntax:
ipconfig /all

ipxroute – Manages IPX routing table entries (older Windows versions).
Syntax:
ipxroute [options]

irftp – Sends a file using infrared.
Syntax:
irftp filename

Windows Commands (J) with Syntax

jetpack – Compacts and defragments Jet database files.
Syntax:
jetpack source destination

Windows Commands (K) with Syntax

klist – Displays a list of cached Kerberos tickets.
Syntax:
klist

ksetup – Configures Kerberos authentication settings.
Syntax:
ksetup [options]

ksetup addenctypeattr – Adds an encryption type attribute for a realm.
Syntax:
ksetup /addenctypeattr realm encryption_type

ksetup addhosttorealmmap – Maps a host to a Kerberos realm.
Syntax:
ksetup /addhosttorealmmap hostname realm

ksetup addkdc – Adds a Kerberos Key Distribution Center (KDC) for a realm.
Syntax:
ksetup /addkdc realm kdc_name

ksetup addkpasswd – Adds a Kerberos password server for a realm.
Syntax:
ksetup /addkpasswd realm password_server

ksetup addrealmflags – Sets specific realm flags.
Syntax:
ksetup /addrealmflags realm flag

ksetup changepassword – Changes the computer’s Kerberos password.
Syntax:
ksetup /changepassword

ksetup delenctypeattr – Deletes an encryption type attribute for a realm.
Syntax:
ksetup /delenctypeattr realm encryption_type

ksetup delhosttorealmmap – Removes a host-to-realm mapping.
Syntax:
ksetup /delhosttorealmmap hostname

ksetup delkdc – Removes a KDC for a specified realm.
Syntax:
ksetup /delkdc realm kdc_name

ksetup delkpasswd – Removes a Kerberos password server.
Syntax:
ksetup /delkpasswd realm password_server

ksetup delrealmflags – Removes specific flags from a realm.
Syntax:
ksetup /delrealmflags realm flag

ksetup domain – Sets the Kerberos authentication domain.
Syntax:
ksetup /domain domain_name

ksetup dumpstate – Displays the current Kerberos configuration.
Syntax:
ksetup /dumpstate

ksetup getenctypeattr – Retrieves encryption type attributes for a realm.
Syntax:
ksetup /getenctypeattr realm

ksetup listrealmflags – Lists the realm flags currently set.
Syntax:
ksetup /listrealmflags realm

ksetup mapuser – Maps a local user account to a Kerberos principal.
Syntax:
ksetup /mapuser principal local_user

ksetup removerealm – Removes a Kerberos realm from the configuration.
Syntax:
ksetup /removerealm realm

ksetup server – Configures the Kerberos server.
Syntax:
ksetup /server server_name

ksetup setcomputerpassword – Sets the computer’s Kerberos authentication password.
Syntax:
ksetup /setcomputerpassword password

ksetup setenctypeattr – Sets encryption type attributes for a realm.
Syntax:
ksetup /setenctypeattr realm encryption_type

ksetup setrealm – Defines the default Kerberos realm.
Syntax:
ksetup /setrealm realm

ksetup setrealmflags – Sets specific realm flags.
Syntax:
ksetup /setrealmflags realm flag

ktmutil – Manages Kernel Transaction Manager (KTM) transactions.
Syntax:
ktmutil [options]

ktpass – Configures Kerberos keytab files for interoperability.
Syntax:
ktpass /princ principal_name /mapuser user /pass password /out keytab_file

Windows Commands (L) with Syntax

label – Creates, changes, or deletes the volume label of a disk.
Syntax:
label [drive:][label]

list – Displays available disks, partitions, volumes, providers, or shadows.
Syntax:
list [disk | partition | volume | providers | shadows | writers]

list providers – Lists available Volume Shadow Copy Service (VSS) providers.
Syntax:
list providers

list shadows – Lists available shadow copies.
Syntax:
list shadows

list writers – Displays the status of VSS writers on the system.
Syntax:
list writers

load metadata – Loads a VSS metadata file.
Syntax:
load metadata

lodctr – Updates performance counter registry settings from a specified initialization file.
Syntax:
lodctr [filename]

logman – Manages Performance Logs and Alerts.
Syntax:
logman [command] [options]

logman create – Creates a data collector.
Syntax:
logman create [collector_name] [options]

logman create alert – Creates an alert data collector.
Syntax:
logman create alert -threshold

logman create api – Creates an API trace data collector.
Syntax:
logman create api -p

logman create cfg – Creates a configuration data collector.
Syntax:
logman create cfg

logman create counter – Creates a performance counter data collector.
Syntax:
logman create counter -cf

logman create trace – Creates a trace data collector.
Syntax:
logman create trace -p

logman delete – Deletes a data collector.
Syntax:
logman delete

logman import and logman export – Imports or exports data collector settings.
Syntax:
logman import
logman export

logman query – Queries existing data collectors.
Syntax:
logman query [options]

logman start and logman stop – Starts or stops a data collector.
Syntax:
logman start
logman stop

logman update – Updates a data collector’s settings.
Syntax:
logman update [options]

logman update alert – Updates an alert data collector.
Syntax:
logman update alert -threshold

logman update api – Updates an API trace data collector.
Syntax:
logman update api -p

logman update cfg – Updates a configuration data collector.
Syntax:
logman update cfg

logman update counter – Updates a performance counter data collector.
Syntax:
logman update counter -cf

logman update trace – Updates a trace data collector.
Syntax:
logman update trace -p

logoff – Logs off the current user session.
Syntax:
logoff [session_id]

lpq – Displays the status of print jobs in a queue.
Syntax:
lpq -S -P

lpr – Sends a file to a network printer.
Syntax:
lpr -S -P

Windows Commands (M) with Syntax

macfile – Manages Macintosh-accessible files and directories on Windows Server.
Syntax:
macfile [command] [options]

makecab – Compresses files into a cabinet (.CAB) file.
Syntax:
makecab

manage-bde – Manages BitLocker Drive Encryption.
Syntax:
manage-bde [command] [options]

manage-bde -status – Displays the status of BitLocker encryption.
Syntax:
manage-bde -status

manage-bde -on – Enables BitLocker on a specified drive.
Syntax:
manage-bde -on

manage-bde -off – Disables BitLocker on a specified drive.
Syntax:
manage-bde -off

manage-bde -pause – Pauses BitLocker encryption or decryption.
Syntax:
manage-bde -pause

manage-bde -resume – Resumes BitLocker encryption or decryption.
Syntax:
manage-bde -resume

manage-bde -lock – Locks a BitLocker-protected drive.
Syntax:
manage-bde -lock

manage-bde -unlock – Unlocks a BitLocker-protected drive using a password or recovery key.
Syntax:
manage-bde -unlock -RecoveryPassword

manage-bde -autounlock – Enables or disables auto-unlock for a BitLocker-protected drive.
Syntax:
manage-bde -autounlock -enable

manage-bde -protectors – Manages BitLocker key protectors.
Syntax:
manage-bde -protectors -add -RecoveryPassword

manage-bde -tpm – Configures the Trusted Platform Module (TPM) for BitLocker.
Syntax:
manage-bde -tpm -status

manage-bde -setidentifier – Sets the BitLocker identifier for a drive.
Syntax:
manage-bde -setidentifier

manage-bde -forcerecovery – Forces a BitLocker recovery mode.
Syntax:
manage-bde -forcerecovery

manage-bde -changepassword – Changes the BitLocker password.
Syntax:
manage-bde -changepassword

manage-bde -changepin – Changes the BitLocker PIN.
Syntax:
manage-bde -changepin

manage-bde -changekey – Changes the BitLocker recovery key.
Syntax:
manage-bde -changekey

manage-bde -keypackage – Exports a BitLocker key package.
Syntax:
manage-bde -keypackage

manage-bde -upgrade – Upgrades BitLocker metadata for a specified drive.
Syntax:
manage-bde -upgrade

manage-bde -wipefreespace – Wipes free space on a drive to prevent data recovery.
Syntax:
manage-bde -wipefreespace

mapadmin – Manages network drive mappings for administrators.
Syntax:
mapadmin [command] [options]

md – Creates a new directory (alias for mkdir).
Syntax:
md

merge vdisk – Merges differencing virtual hard disks (VHDs).
Syntax:
merge vdisk

mkdir – Creates a new directory.
Syntax:
mkdir

mklink – Creates symbolic links and hard links.
Syntax:
mklink [/D | /H | /J]

mmc – Opens the Microsoft Management Console.
Syntax:
mmc

mode – Configures system devices such as COM ports.
Syntax:
mode [device] [options]

more – Displays file contents one screen at a time.
Syntax:
more

mount – Mounts a file system or volume.
Syntax:
mount [device] [mount_point]

mountvol – Creates, deletes, or lists a volume mount point.
Syntax:
mountvol

move – Moves files or directories.
Syntax:
move

mqbkup – Backs up message queue files.
Syntax:
mqbkup /b

mqsvc – Starts the Message Queuing service.
Syntax:
mqsvc

mqtgsvc – Starts the Message Queuing Triggers service.
Syntax:
mqtgsvc

msdt – Microsoft Diagnostic Tool.
Syntax:
msdt /id

msg – Sends messages to users on a network.
Syntax:
msg

msiexec – Installs, repairs, or removes MSI-based applications.
Syntax:
msiexec /i

msinfo32 – Opens the System Information tool.
Syntax:
msinfo32

mstsc – Opens the Remote Desktop Connection tool.
Syntax:
mstsc /v:

Windows Commands (N) with Syntax

nbtstat – Displays NetBIOS over TCP/IP (NetBT) statistics and current connections.
Syntax:
nbtstat [-a ] [-A ] [-c] [-n] [-r] [-s] [-S]

netcfg – Installs, configures, and manages network components.
Syntax:
netcfg -l -c s -i

netdom – Manages domains, trusts, and computer accounts.
Syntax:
netdom

net print – Displays print queue status.
Syntax:
net print \\\

netsh – Configures and manages network settings.
Syntax:
netsh [context] [command]

netstat – Displays network connections and statistics.
Syntax:
netstat [-a] [-b] [-e] [-n] [-o] [-p ] [-r] [-s] [-t] [-x]

nfsadmin – Manages Server for NFS and Client for NFS.
Syntax:
nfsadmin server [ComputerName] [Options]

nfsshare – Manages shared directories for NFS.
Syntax:
nfsshare [options]

nfsstat – Displays statistics about NFS client and server activity.
Syntax:
nfsstat [options]

nlbmgr – Manages Network Load Balancing clusters.
Syntax:
nlbmgr

nltest – Tests trust relationships and domain controllers.
Syntax:
nltest [options]

nslookup – Queries DNS servers for information about domains.
Syntax:
nslookup [options] [host]

nslookup exit – Exits the nslookup interactive mode.
Syntax:
exit

nslookup finger – Queries information about users on a system (if supported).
Syntax:
finger [username]

nslookup help – Displays help for nslookup commands.
Syntax:
help

nslookup ls – Lists DNS records for a domain.
Syntax:
ls -t

nslookup lserver – Changes the default server to the specified DNS server.
Syntax:
lserver

nslookup root – Sets the root server as the current server.
Syntax:
root

nslookup server – Specifies a DNS server to use.
Syntax:
server

nslookup set – Configures nslookup settings.
Syntax:
set

nslookup set all – Displays current nslookup settings.
Syntax:
set all

nslookup set class – Specifies the query class (IN, CH, HS).
Syntax:
set class=

nslookup set d2 – Enables detailed debugging mode.
Syntax:
set d2

nslookup set debug – Enables debugging mode.
Syntax:
set debug

nslookup set domain – Sets the default domain name.
Syntax:
set domain=

nslookup set port – Specifies the port number for DNS queries.
Syntax:
set port=

nslookup set querytype – Specifies the type of DNS record to query (e.g., A, MX, NS).
Syntax:
set querytype=

nslookup set recurse – Enables or disables recursive queries.
Syntax:
set recurse=

nslookup set retry – Specifies the number of retry attempts for a query.
Syntax:
set retry=

nslookup set root – Specifies the root server.
Syntax:
set root=

nslookup set search – Enables or disables searching of domains.
Syntax:
set search=

nslookup set srchlist – Sets the search list for DNS queries.
Syntax:
set srchlist=

nslookup set timeout – Sets the timeout period for queries.
Syntax:
set timeout=

nslookup set type – Specifies the type of DNS record to query (same as querytype).
Syntax:
set type=

nslookup set vc – Forces queries to use a virtual circuit (TCP).
Syntax:
set vc

nslookup view – Displays cached DNS responses.
Syntax:
view

ntbackup – Creates and restores backups.
Syntax:
ntbackup [options]

ntcmdprompt – Opens a command prompt inside Windows NT.
Syntax:
ntcmdprompt

ntfrsutl – Manages and monitors the File Replication Service (FRS).
Syntax:
ntfrsutl [command] [options]

Windows Commands (O) with Syntax

offline – Marks an object (such as a disk or volume) as offline.
Syntax:
offline

offline disk – Takes a disk offline.
Syntax:
offline disk [disk_number]

offline volume – Takes a volume offline.
Syntax:
offline volume [volume_number]

online – Marks an object (such as a disk or volume) as online.
Syntax:
online

online disk – Brings a disk online.
Syntax:
online disk [disk_number]

online volume – Brings a volume online.
Syntax:
online volume [volume_number]

openfiles – Displays files that are open by remote users and allows management of them.
Syntax:
openfiles /query [/fo ] [/nh]

Windows Commands (P) with Syntax

pagefileconfig – Configures virtual memory settings (pagefile).
Syntax:
pagefileconfig /change /s /m

path – Displays or sets a search path for executable files.
Syntax:
path []

pathping – Traces routes and computes network packet loss statistics.
Syntax:
pathping

pause – Pauses the execution of a batch script.
Syntax:
pause

pbadmin – Manages performance baselines (used in diagnostics).
Syntax:
pbadmin [options]

pentnt – Detects floating-point division errors in older Intel processors.
Syntax:
pentnt [/o]

perfmon – Opens the Performance Monitor tool.
Syntax:
perfmon

ping – Sends ICMP echo requests to test network connectivity.
Syntax:
ping

pktmon – Monitors and logs network packets in real time.
Syntax:
pktmon [options]

pnpunattend – Automates driver installation for plug-and-play devices.
Syntax:
pnpunattend [options]

pnputil – Manages device drivers (install, remove, export).
Syntax:
pnputil /add-driver

popd – Restores the previous directory saved by pushd.
Syntax:
popd

powershell – Opens the PowerShell command-line interface.
Syntax:
powershell

powershell ise – Opens the PowerShell Integrated Scripting Environment (ISE).
Syntax:
powershell_ise

print – Sends a file to a printer.
Syntax:
print /d:

prncnfg – Configures printers.
Syntax:
prncnfg -t -p

prndrvr – Manages printer drivers.
Syntax:
prndrvr -a -m -v -e -i

prnjobs – Manages print jobs.
Syntax:
prnjobs -l -p

prnmngr – Manages printers (add/remove/set default).
Syntax:
prnmngr -a -p -m -r

prnport – Manages printer ports.
Syntax:
prnport -a -r -h

prnqctl – Manages print queues.
Syntax:
prnqctl -e -p

prompt – Changes the command prompt appearance.
Syntax:
prompt [custom_text]

pubprn – Publishes a printer to Active Directory.
Syntax:
pubprn -p

pushd – Saves the current directory and changes to a new directory.
Syntax:
pushd

pushprinterconnections – Deploys printer connections via Group Policy.
Syntax:
pushprinterconnections.exe

pwlauncher – Configures Windows PowerShell as a replacement for Windows Command Prompt.
Syntax:
pwlauncher /enable

pwsh – Opens the PowerShell Core shell.
Syntax:
pwsh

Windows Commands (Q) with Syntax

qappsrv – Displays a list of all terminal servers on the network.
Syntax:
qappsrv [server_name]

qprocess – Displays information about processes running on a remote or local system.
Syntax:
qprocess [process_name] [/server:server_name] [/id:session_id] [/user:user_name]

query – Displays information about various system components such as users, processes, and sessions.
Syntax:
query

query process – Displays information about processes running on a terminal server.
Syntax:
query process [process_name | *] [/server:server_name] [/id:session_id] [/user:user_name]

query session – Displays information about sessions on a terminal server.
Syntax:
query session [session_name | session_id | username] [/server:server_name]

query termserver – Lists available terminal servers.
Syntax:
query termserver [domain_name]

query user – Displays information about logged-in users on a remote or local system.
Syntax:
query user [username | sessionname | sessionID] [/server:server_name]

quser – Displays information about currently logged-on users.
Syntax:
quser [username | *] [/server:server_name]

qwinsta – Displays information about remote desktop sessions.
Syntax:
qwinsta [sessionname | username | sessionID] [/server:server_name]

Windows Commands (R) with Syntax

rd – Removes an empty directory.
Syntax:
rd [drive:]path [/s] [/q]

rdpsign – Signs a Remote Desktop Protocol (RDP) file.
Syntax:
rdpsign

recover – Recovers readable information from a damaged disk.
Syntax:
recover [drive:][path]filename

recover disk group – Recovers a disk group in a dynamic disk environment.
Syntax:
recover disk group

refsutil – A command-line tool for managing ReFS (Resilient File System).
Syntax:
refsutil [options]

reg – A command-line tool to manage the Windows Registry.
Syntax:
reg [parameters]

reg add – Adds a new registry entry.
Syntax:
reg add HKLM\Software\Example /v MyValue /t REG_SZ /d "MyData" /f

reg compare – Compares two registry keys or values.
Syntax:
reg compare HKLM\Software\Example HKCU\Software\Example

reg copy – Copies a registry key from one location to another.
Syntax:
reg copy HKLM\Software\Source HKLM\Software\Destination /s

reg delete – Deletes a registry key or value.
Syntax:
reg delete HKLM\Software\Example /v MyValue /f

reg export – Exports a registry key to a .reg file.
Syntax:
reg export HKLM\Software\Example C:\backup.reg

reg import – Imports a registry key from a .reg file.
Syntax:
reg import C:\backup.reg

reg load – Loads a registry hive.
Syntax:
reg load HKLM\MyHive C:\MyHive.dat

reg query – Displays the contents of a registry key.
Syntax:
reg query HKLM\Software\Example

reg restore – Restores a registry hive from a backup.
Syntax:
reg restore HKLM\Software C:\backup.hiv

reg save – Saves a registry key to a file.
Syntax:
reg save HKLM\Software C:\backup.hiv

reg unload – Unloads a registry hive.
Syntax:
reg unload HKLM\MyHive

regini – Modifies registry permissions from the command line.
Syntax:
regini script.txt

regsvr32 – Registers or unregisters a DLL or ActiveX control.
Syntax:
regsvr32 mydll.dll

relog – Converts or resamples performance logs.
Syntax:
relog logfile.blg -f CSV -o output.csv

rem – Adds a comment in a batch file.
Syntax:
rem This is a comment

remove – Removes a specific item (varies by context).
Syntax:
remove

ren – Renames a file or directory.
Syntax:
ren oldfile.txt newfile.txt

rename – Same as ren, renames files or directories.
Syntax:
rename oldfile.txt newfile.txt

repadmin – Replicates Active Directory information.
Syntax:
repadmin /syncall

repair – Used to repair specific system components.
Syntax:
repair

repair bde – Repairs a BitLocker-encrypted drive.
Syntax:
repair-bde C: D: -rp

replace – Replaces files in a directory.
Syntax:
replace sourcefile destination [/A] [/U]

rescan – Scans for new disks.
Syntax:
rescan

reset – Resets a system component.
Syntax:
reset

reset session – Resets a Remote Desktop session.
Syntax:
reset session

retain – Used in disk partitioning.
Syntax:
retain

revert – Reverts changes in a system component.
Syntax:
revert

rexec – Runs commands on a remote computer.
Syntax:
rexec

risetup – Used to set up Remote Installation Services (RIS).
Syntax:
risetup

rmdir – Removes a directory.
Syntax:
rmdir /s /q C:\example

robocopy – Copies files and directories with advanced options.
Syntax:
robocopy C:\source C:\destination /MIR

route ws2008 – Manages network routing tables.
Syntax:
route print

rpcinfo – Displays information about RPC services.
Syntax:
rpcinfo -p

rpcping – Tests RPC connectivity.
Syntax:
rpcping -s

rsh – Executes commands on a remote computer.
Syntax:
rsh

rundll32 – Runs DLLs as commands.
Syntax:
rundll32.exe shell32.dll,Control_RunDLL

rundll32 printui – Opens the printer UI.
Syntax:
rundll32 printui.dll,PrintUIEntry /?

rwinsta – Resets a remote desktop session.
Syntax:
rwinsta

Windows Commands (S) with Syntax

san – Manages storage area networks (SANs).
Syntax:
san policy=

sc config – Configures a service.
Syntax:
sc config start= auto

sc create – Creates a new service.
Syntax:
sc create binPath= ""

sc delete – Deletes a service.
Syntax:
sc delete

sc query – Displays information about a service.
Syntax:
sc query

schtasks – Manages scheduled tasks.
Syntax:
schtasks /create /tn "" /tr "" /sc daily /st 12:00

scwcmd – Command-line tool for Security Configuration Wizard.
Syntax:
scwcmd [options]

scwcmd analyze – Analyzes security policies.
Syntax:
scwcmd analyze /p:

scwcmd configure – Applies a security policy.
Syntax:
scwcmd configure /p:

scwcmd register – Registers a security policy.
Syntax:
scwcmd register /p:

scwcmd rollback – Rolls back a security policy.
Syntax:
scwcmd rollback

scwcmd transform – Converts a security policy to a GPO.
Syntax:
scwcmd transform /p: /g:

scwcmd view – Displays security policy details.
Syntax:
scwcmd view /p:

secedit – Configures and analyzes system security.
Syntax:
secedit [options]

secedit analyze – Analyzes security settings.
Syntax:
secedit /analyze /db /cfg