Windows Commands

Windows Explorer Commands


Command Purpose
Ctrl+Shift+N Create new folder

CLI Commands



Command Purpose
CLI commands output in console window
gpupdate /force Update policies
net stats workstation | find "since" Last boot time
net user "Name" /domain | find /i "Password expires" Display password expiry date for Domain user account
pathping N.N.N.N like tracert
powercfg -h off Turn off hiberfile.sys, saves about 8 Gb disk space for desktops that don't need hibernation
powercfg -lastwake Display the device that last woke the PC
powercfg -devicequery wake_armed Display the devices that can wake the CP from sleep mode
query user Show currently logged in users
setx FOO bar permanently sets environment variable FOO=bar. Not set in current command console.
systeminfo | find "Boot" Last boot time
tasklist Names and PIDs of running processes
taskkill /f /im NAME Forcefully kill running process NAME
timeout /T 15 /NOBREAK Sleep (timeout) for 15 seconds. Ctrl-C to cancel
vssadmin Shadow store (don't remember why this one was useful...)
certutil -hashfile FILE SHA256 Generate SHA256 hash for FILE

Control Panels



Command Purpose
Control Panels Opens GUI from command line
appwiz.cpl Add/Remove Programs
desk.cpl Display Properties
compmgmt.msc Computer Management
devmgmt.msc Device Manager
diskmgmt.msc Disk Managment Control Panel
eventvwr Event Viewer
gpedit.msc Local Group Policy Editor
start fonts Fonts installed on system
lusrmgr Local Users and Groups admin
msconfig System Configuration: stuff like startup, boot options, services, startup programs, names of system commands
msinfo32 Displays general system information
sysdm.cpl System Properties -> Advanced tab -> Environment Variables
mklink /J <linkpath> <folderpath> Create "junction" (symbolic link) <linkpath> to real folder <folderpath>. E.g. to create a symbolic link C:\Comix to real folder C:\Users\Bob\Documents\Comix, type mklink /J C:\Comix C:\Users\Bob\Documents\Comix
mstsc /v:<computername> Remote Desktop Connection to <computername>
services.msc Services
taskschd.msc Task Scheduler
winver displays Windows version and build

How to "Run as Admin" from Windows button


  1. Hit the "Windows" button on the keyboard
  2. Type a command to run as admin, e.g. "services"
  3. Type Ctrl-Shift-Enter to run command AS ADMIN!

Useful Event Viewer IDs

Open Windows Logs: System then filter on Event IDs 6005, 6009 to find last boot time

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.