Powershell enable rule, run rule and disable rule

Jun 2, 2015 at 6:20 AM
Hi,

I'm a newbie to Powershell and need some help creating a powershell that first enables a rule then runs the rule and after that disables the rule.
Can someone here help me?

Regards

Roger
Jun 4, 2015 at 12:17 PM
Is it as simple as this?

connect-poshwsusserver -wsusserver servername-port 8530
set-poshwsusinstallapprovalrule -name rulename -enable
Start-WSUSInstallApprovalRule name rulname
set-poshwsusinstallapprovalrule -name rulname -disable

Will this work if I create a powershell script of it?

Regards

Roger