Command Prompt: Software Commands

less than 1 minute read

Description:

The following commands can be ran in the Windows Command Prompt.

To Stop A Service:

sc stop (serviceName)
net stop (serviceName) or (serviceDisplayName)

To Disable A Service:

sc config (serviceName) start= disabled

To Enable Built-In Administrator Account:

net user administrator /active:yes
net user administrator 112233 
:: Where 112233 is the password for the account

To Add A New Admin User:

:: Where 111222333 is the password
net user gerry 111222333 /add

:: Add to admin group
net localgroup administrators gerry /add

:: Add to another group
net localgroup "Remote Desktop users" gerry /add

To Remove A User:

net user gerry /delete

To Uninstall Specific Windows Updates:

wusa /uninstall /kb:(update ID) # ex: wusa /uninstall /kb:980302

To Change The Color Of CMD Prompt Text:

:: Green
color 0a

:: Red
color 0c

:: Default
color 07

To Check The OS For Corruption:

sfc /scannow

To Schedule A PS Script For Startup:

schtasks /create /tn "Startup PowerShell" /tr C:\scripts\psstart.bat /sc onstart /ru SYSTEM

To Disable UAC:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

To Enable .NET 3.5:

dism /Online /Enable-Feature /FeatureName:NetFx3 /All