Description:
The following commands can be ran in the Windows Command Prompt.
To Stop A Service:
1
2
| sc stop (serviceName)
net stop (serviceName) or (serviceDisplayName)
|
To Disable A Service:
1
| sc config (serviceName) start= disabled
|
To Enable Built-In Administrator Account:
1
2
3
| net user administrator /active:yes
net user administrator 112233
:: Where 112233 is the password for the account
|
To Add A New Admin User:
1
2
3
4
5
6
7
8
| :: 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:
To Uninstall Specific Windows Updates:
1
| wusa /uninstall /kb:(update ID) # ex: wusa /uninstall /kb:980302
|
To Change The Color Of CMD Prompt Text:
1
2
3
4
5
6
7
8
| :: Green
color 0a
:: Red
color 0c
:: Default
color 07
|
To Check The OS For Corruption:
To Schedule A PS Script For Startup:
1
| schtasks /create /tn "Startup PowerShell" /tr C:\scripts\psstart.bat /sc onstart /ru SYSTEM
|
To Disable UAC:
1
| 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:
1
| dism /Online /Enable-Feature /FeatureName:NetFx3 /All
|
Comments