WMIC Examples


I did not get many chances to use WMIC (Windows Management Instrumentation Command-line) before, but recently I have used it twice and found it is really handy!

Example 1: Get local user SID

wmic useraccount get name,sid

Example 2: Set a local user’s password never expire

wmic useraccount where “Name=’user01′” set Passwordexpires=false

Leave a comment