<# 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
原文:http://www.cnblogs.com/Tty725/p/6393371.html