<#
Get-ExecutionPolicy
默认为 RemoteSigned
该签名设置
Set-ExecutionPolicy Unrestricted
添加到排除
powershell -executionpolicy Unrestricted -file "C:\wsusclean.ps1"
计划任务
powershell.exe -file "C:\wsusclean.ps1"
#> Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates
05-11 22:56