Windows CMD Quick Reference — Useful Command Lines for IT Pros
Important: Always open Command Prompt in Administrator mode for the commands below that require elevated privileges.
From Run (Win+R) type cmd then press Ctrl+Shift+Enter to launch an elevated Command Prompt.
File & Folder: encryption and attributes
Encrypt files in a folder (NTFS)
cipher /E <folderpath>
Encrypts a folder (and new files inside it) using the built-in EFS (Encrypting File System). Use /E to encrypt and /D to decrypt. For more advanced behavior and secure-overwrite of free space, see Microsoft’s documentation.
Hide a folder from Explorer (set Hidden, System, Read-only attributes)
attrib +h +s +r "foldername"
To unhide:
attrib -h -s -r "foldername"
The attrib command sets or clears file/folder attributes. When scripting, you can combine /S /D to recurse through files and directories. Hidden/system attributes affect Explorer visibility but are not security controls—use file ACLs and encryption for true protection.
Wi-Fi profiles & passwords (local machine)
netsh wlan show profiles
List stored WLAN profiles.
netsh wlan show profile name="NETWORK NAME" key=clear
Show clear-text key (password) for a specific profile. Requires appropriate privileges and that the profile was stored on the machine. Use responsibly.
System info & diagnostics
Show OS and hardware summary
systeminfo
Prints OS version, installed hotfixes, hardware summary (RAM), network adapters, etc. Useful for troubleshooting or inventory. Use /fo csv for machine-parsable output.
Console visuals & usability
Clear screen
cls
Clears the Command Prompt display buffer. Useful in scripts or interactive troubleshooting to reduce noise.
Change console colors
color 02
color accepts two hex digits: first = background, second = foreground. Example 02 sets black background / green text. Valid hex values range 0-F. Use for readable logs or emphasis during interactive sessions.
Color table (hex → name):
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
Networking & quick external checks
Get public IP via curl
curl checkip.amazonaws.com
Simple HTTP query to return the public IP seen by the endpoint. Useful in diagnostics to confirm NAT/public IP vs. local adapter config.
Fetch a URL or quick web resource
curl https://ideasequaltechnology.com
curl is a general-purpose command-line HTTP client. Ideal for quick availability checks, downloading resources, or scripting API calls.
Open a URL in the default browser
start https://ideasequaltechnology.com
start launches the URL in the user’s default browser from CMD. Useful from scripts or remote support sessions.
Remote text access / legacy
Telnet into text service (example)
telnet telehack.com
telnet is a legacy TCP terminal client; many systems disable the Windows Telnet client by default. Use only for trusted tests or lab usage. For secure remote shells, prefer ssh.
Quick operational notes & best practices (IT-grade)
- Elevation: Many commands (cipher, modifying system attributes in certain folders, network profile inspection) require administrative privileges. Launch elevated CMD via
Ctrl+Shift+Enterfrom Run. - Security: Hiding a folder (
attrib +h +s) is not a security control—use NTFS ACLs and EFS or BitLocker for confidentiality.netsh wlan ... key=clearreveals secrets stored locally—only run on systems you manage. - Scripting: Use redirection operators (
>,>>) or PowerShell /Out-File/Export-Csvwhen collecting output for reports or automation (systeminfo /fo csv > systeminfo.csv). - Cross-platform tooling:
curlis standardized across systems; use it for consistent checks in heterogeneous environments.
