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


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\microsoft-windows-netfx3-ondemand-package.cab


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


Message (aka net send)

msg /server:hostname username

Example:

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


Show Domain Controllers in domain

nltest /dclist:example.com


Set Environment variable on remote computer

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

Example:

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


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)

Related post: Linux Cheatsheet

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

More on ITDB

Change Resize Mode for all VMs in RoyalTS 4


Oracle Universal Installer - Successfully completed with errors


Finding the source for locked AD account from Event Viewer log on Domain controller


Get Linux distribution information from terminal


NiceHash hacked?




Leave a Reply

Your email address will not be published. Required fields are marked *