Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PING
- ECHO "Enabling ICMPv4"
- Import-Module NetSecurity
- Set-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)" -enabled True
- ECHO "Done"
- # NAME
- ECHO "Changing server name"
- $name = Read-Host "Insert server name"
- Rename-Computer $name
- ECHO "Done"
- # RDP
- ECHO "Enabling RDP"
- $server = hostname
- Invoke-Command -ComputerName $server -ScriptBlock {Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0}
- Invoke-Command -ComputerName $server -ScriptBlock {Enable-NetFirewallRule -DisplayGroup "Remote Desktop"}
- ECHO "Done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement