Intune Initial Scripts Backup
This commit is contained in:
10
dump/WSUS_Scripts/Old-Scripts/old-Patch-WSUSGroup.ps1
Normal file
10
dump/WSUS_Scripts/Old-Scripts/old-Patch-WSUSGroup.ps1
Normal file
@@ -0,0 +1,10 @@
|
||||
$ErrorActionPreference = "Ignore"
|
||||
$WSUSGroup = Read-Host "Enter Target Group Name"
|
||||
$servers = Get-WsusComputer -ComputerTargetGroups "$WSUSGroup" -IncludeSubgroups|select Fulldomainname -ExpandProperty Fulldomainname
|
||||
Foreach ($server in $servers) {Install-WindowsUpdate -ComputerName $server -AsJob}
|
||||
|
||||
#Function Restart {# Force Reboot of Group (when auto failed) un-rem and run line below.
|
||||
#Foreach ($server in $servers) {Restart-Computer -ComputerName $server -Force}}
|
||||
|
||||
#Write-Host "Type Restart and press enter to reboot the $WSUSGroup WSUS Computer Group"
|
||||
Read-Host -Prompt "Press Enter to exit"
|
||||
Reference in New Issue
Block a user