1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# #Enable remote desktop (Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace root\cimv2\terminalservices).SetAllowTsConnections(1) (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(1) #Enable PSRemoting Enable-PSRemoting -Force Winrm quickconfig #Set firewall rules Set-NetFirewallRule -DisplayName "Remote Desktop*" -enabled true # |
Simple patch script
Recently i needed a quick way to automate patching and rebooting of servers in our data-center. We felt that just using standard WSUS with GPOs was to fuzzy and not specific enough regarding reporting after patching had completed. I could have set up our event log collection servers to alert any errors post-reboot, or i…