From LedHed's Wiki
Revision as of 12:20, 5 September 2013 by Ledhed (Talk | contribs)

Jump to: navigation, search

Get BIOS Information From Command Line

wmic BIOS Get SerialNumber

Note: This only works if the serial number is stored in the BIOS. Most OEM's like HP, Dell, and Lenovo do this.

 wmic BaseBoard Get SerialNumber


Get OS Version

wmic OS GET CAPTION,VERSION


Get a User's SID

wmic UserAccpimt WHERE Name="<USERNAME>" Get Name,SID

Note: Substitute <USERNAME> with the Username of the SID you want retrieve.


Get Last logged in user

wmic PATH Win32_NetworkLoginProfile GET Name,LastLogon



Refrences

http://msdn.microsoft.com/en-us/library/windows/desktop/aa394221%28v=vs.85%29.aspx

http://blogs.technet.com/b/askperf/archive/2012/02/17/useful-wmic-queries.aspx