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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s