Commands of the day

By | May 3, 2012

First how to check if somone is loged in to a remote computer in your domain

wmic /node:<computer name> computersystem get username

To disable the network card or enable it

netsh interface set interface "local area connection" disabled
netsh interface set interface "local area connection" enable

To add a user admin with the password of password to the admins group

net user admin password /add
net localgroup administrators admin /add

To start remote desktop connection

mstsc