WMIC Command in Windows:


Get a list of Local groups:
wmic group get name



Get a list of Local groups on remote computer (10.x.x.100):
wmic /node:10.x.x.100 group get name



Get a list of Local user accounts:
wmic useraccount get name



Get a list of Local user accounts on remote computer (10.x.x.100):
wmic /node: 10.x.x.100 useraccount get name



Get a list of brief list of user accounts on remote computer (10.x.x.100):
wmic /node:10.x.x.100 useraccount list brief



Tips: You can always see help like following:


wmic /?
would give you complete list of global switches and aliases.

wmic group /?
would display help related to group alias.

wmic group get /?
would show you usage of group alias as well as list its property value that you can you with WHERE syntax, like used in following expamples:


Get a list of drive with drive type=3 and also filter the output using findstr command
wmic logicaldisk WHERE "DriveType='3'" get name | findstr D



Get administrators groups only on remote computer (10.x.x.100):
wmic /node:10.x.x.100 group where "name='administrators'" get



Get D: drive FreeSpace (in bytes):
wmic logicaldisk where "DeviceID='D:'" get FreeSpace | findstr [0-9]


Set Password Never Expire for users1:
wmic useraccount where "Name='user1'" SET PasswordExpires=FALSE


Following example shows all the associations that the Administrators group has with the system. For example,
Administrators group members and the drives that they own appear in the list of properties displayed.

wmic /node:10.98.241.146 group where "name='administrators'" assoc



Find out whether the RPC Service (Note: RPC Service Name is
RpcSs) is Running or Stopped:
wmic service where "name='RpcSs'" get state | findstr /V State


Note: You don’t need to specify Username and Password of Remote Computer, if the username and password of the source machine (local machine) is same as remote machine. But if it is not same then you must specify it as shown in following example:

wmic /node:10.x.x.100 /user: Administrator /password:pa55w@rd useraccount get name



 

Connect With Us
Instant Query
Your Name :

Email Address :

Message :