Midland (432) 242-2700 | Odessa (432) 363-5200

This post is intended for our field technicians and our more technical customers. Please do not run these commands unless you know what they will do.

Add a user to a group
net localgroup GROUPNAME USERNAME /add

Add a domain user to local domain group
net localgroup administrators DOMAIN\USERNAME /add

Add a user to Remote Desktop group
net localgroup "Remote Desktop Users" USERNAME  /add

Create a user

Set user password to never expire
wmic useraccount where "name='USERNAME'" SET passwordexpires=false

Remove a user from group
net localgroup GROUPNAME USERNAME /delete

Disable RDP
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

Enable RDP
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Add incoming remote desktop exception to firewall
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes


Get current CPU load
wmic cpu get loadpercentage

Get current system uptime
systeminfo | find "System Boot Time:"

Rename a PC
wmic computersystem where caption='OLDPCNAME' rename 'NEWPCNAME'



Download a file
bitsadmin /transfer myDownloadJob /download /priority normal http://site/file.ext c:\destfile.ext



Stop a service
sc stop "service name"

Turn off autostart of a service
sc config "service name" start= disabled