WSUS脚本 - 半成品:
#Select Target Group for Update Approval:
$TargetComputerGroups = "All Computers","Unassigned Computers","Clients","Servers","Test","View Templates"
$UserPrompt = @"
Please select a Computer Group from the below options:
1) All Computers (Selects all of the below)
2) Unassigned Computers
3) Clients
4) Servers
5) Test
6) View Templates
Enter selection
"@
###Record user selection to varirable
$TargetComputerGroupTemp = Read-Host -Prompt $UserPrompt
###Convert their choice to the correct 0-index array value.
$TargetComputerIndex = $TargetComputerGroupTemp -1
$ComputerTarget = $TargetComputerGroups[$TargetComputerIndex]