SHARE
TWEET

Untitled

a guest Apr 26th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Basic Commands
  2. --------------
  3. + `cls` clear screen
  4. + `set` set a variable `set VariableName`
  5. + `echo` display result for a varible `echo %PATH%`
  6. + Getting user input with `/P` e.g `set /P name="Enter your name: "`
  7. + `SetX Variablename Value` to make permanet change for a varible.
  8. + Determine operating system version `ver`
  9. + Start an application `start appName`
  10. + Control system service `sc Pause|Stop|Start|Continue|query serviceName`
  11. + LogOff `shutdown \L`
  12. + Get help msg `help cmd` `cmd /?`
  13.  
  14. Configure the Remote System
  15. --------------------------
  16. + Adding a new user:
  17.     + `Net user YourLoginName YourPassword /Add`
  18. + Adding user to a group.
  19.     + `Net LocalGroup "Administrators" YourLoginName /Add` for a WorkGroup if your
  20.        working on a Domain use `Group`
  21. + Change ComputerName:
  22.     + `WMIC ComputerSystem Where Name=%COMPUTERNAME% Call Rename Name="NewName"`
  23. + Add the computer to a Domain/Workgroup.
  24.     + `WMIC ComputerSystem Where Name=%COMPUTERNAME% Call JoinDomainOrWorkGroup Name="WorkGroupName"`
  25. + Granting remote access:
  26.     + `WMIC RDToggle Where ServerName="%COMPUTERNAME%" Call SetAllowTSConnections AllowTSConnections="1"`
  27. + Allow firewall for the remote desktop.
  28.     + `NetSH Firewall Set PortOpening TCP 3389 "Remote Desktop"`
  29. + Allow share.
  30.     + `Net Share "Drive_C"=C:\`
  31. + Change Default Script Engine to commandline.
  32.     + `CScript //H:CScript`
  33. + Activating copy of Server Core `SLMGR -ATO` it takes forever so take a cup of coffee.
  34. + Reboot: `Shutdown /r`
  35.  
  36. Automating Tasks
  37. ----------------
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top