Net Use commands

Just some Net Use commands

Add a local user called Tmpadmin with a password secretpass111:

net user /Add Tmpadmin secretpass111


Add the user Tmpadmin to the local administrators group

net localgroup administrators /Add Tmpadmin


Change password of user Tmpadmin to newpass222:

net user Tmpadmin newpass222

Note: with this simple command you can create a group policy which resets the local administrator password on a OU. Just create a batch file in Computer Configuration, Windows Settings, Scripts, Startup.

net user administrator %1
Then you can use the password as parameter


Retrieve the list of the local users:

net user


Mapping a free drive letter to \\pcname\\sharename, using credentials domainname\username with password secretpass111 (if you don’t type it here, you can enter it after pressing enter and then it will not be displayed)

net use * \\pcname\sharename /user:domainname\username secretpass111


Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s