From LedHed's Wiki
(Created page with "== Get BIOS Information From Command Line == wmic BIOS GET SERIALNUMBER Category:WMI") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Get BIOS Information From Command Line == | == Get BIOS Information From Command Line == | ||
− | wmic BIOS | + | 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 UserAccount 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 | ||
+ | |||
+ | |||
+ | == Get Currently logged in users == | ||
+ | wmic /node: xxx.xxx.xxx.xxx COMPUTERSYSTEM GET USERNAME | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == 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 | ||
[[Category:WMI]] | [[Category:WMI]] |
Latest revision as of 22:05, 17 May 2017
Contents
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 UserAccount 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
Get Currently logged in users
wmic /node: xxx.xxx.xxx.xxx COMPUTERSYSTEM GET USERNAME
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