MS Cheatsheet

Posted on 22.09.17   Cheatsheet Microsoft Windows

List TCP/IP interfaces on remote computer

netsh -r "hostname" interface ipv4 show interfaces

Get Windows OEM license key

wmic path SoftwareLicensingService get OA3xOriginalProductKey

List environment variables


Filter output

set prog

Install .NET Framework 3.5 on Windows 10

Online version:
DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3~~~~

Offline version (requires .cab installer for the .NET framework):
DISM.EXE /Online /Add-Package /PackagePath:C:\Temp\

Kill a non responding task from command prompt

taskkill /F /IM taskname.exe

/F = Force kill (ignores any prompts etc)

/IM = Image Name (name of process)

Generate WLAN report (run as admin)

netsh wlan show wlanreport

» See an example report here

List all server shares on local domain network

net view /all /

Message (aka net send)

msg /server:hostname username


msg /server:pc01 johndoe

List all local MAC addresses

getmac /v

Map network share

net use x: \\server\share /user:domain\username password

Remote sysinfo

msinfo32 /computer hostname

See uptime (and more)

net stats srv

if not available, use

net stats workstation

Show Domain Controllers in domain

nltest /

Set Environment variable on remote computer

setx /s hostname /u domain\user /p pw variable value


setx /s PC1234 /u itdb\kek /p 123456 JAVA_HOME "C:\Program Files\Java\jre1.8.0_73"

See Windows license expiration information

slmgr /xpr

Alternatively run slmgr /dli for detailed information about your Windows license

For remote computers: slmgr hostname username password /dli

Useful Windows utilities which you can start from the RUN prompt

  • lusrmgr.msc (Local Users Management)
  • sysdm.cpl (System Properties)
  • appwiz.cpl (Programs & Features)
  • eventvwr (Event Viewer)
  • compmgmt.msc (Computer Management)
  • printmanagement.msc (Print Management)
  • devmgmt.msc (Device Management)
  • services.msc (Services)
  • taskschd.msc (Task Scheduler)


This post will be continually updated with useful tips for remote troubleshooting and various tools for Microsoft environments


Related posts:

CRON Cheatsheet

Powershell Snippets

Linux Cheatsheet


More on ITDB

Managing WiFi profiles in Windows 10

How to debug a non starting application with ProcMon

Create a cmd alias/shortcut for issuing commands on remote computer

Turn off CTRL + ALT + DEL at login prompt Windows 10

Telnet alternative to check if port is open on host