From LedHed's Wiki
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
== Get a User's SID == | == Get a User's SID == | ||
− | wmic | + | wmic UserAccount WHERE Name="<USERNAME>" Get Name,SID |
Note: Substitute <USERNAME> with the Username of the SID you want retrieve. | Note: Substitute <USERNAME> with the Username of the SID you want retrieve. | ||
Line 16: | Line 16: | ||
== Get Last logged in user == | == Get Last logged in user == | ||
wmic PATH Win32_NetworkLoginProfile GET Name,LastLogon | wmic PATH Win32_NetworkLoginProfile GET Name,LastLogon | ||
+ | |||
+ | |||
+ | == Get Currently logged in users == | ||
+ | wmic /node: xxx.xxx.xxx.xxx COMPUTERSYSTEM GET USERNAME | ||
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