Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Using Read-Host to set WSUS auoption schedule - Help pls

$
0
0

Hi I am still learning powershell and was wondering if you guys can share a clever way of scheduling WSUS auoptions to modify the reg key, prompting an Admin user with Read-Host to set registry AU options + set the Target group of Servers also. NB: I already know the Group policy way

AUOptions

Range = 2|3|4|5

2 = Notify before download.

3 = Automatically download and notify of installation.

4 = Automatic download and scheduled installation. (Only valid if values exist for ScheduledInstallDay and ScheduledInstallTime.)

5 = Automatic Updates is required, but end users can configure it.

*********************************************************

So I want a powershell script that can

A. Prompt the user to enter the Value for WSUS schedule weekend to be changed from

2 = Notify before download to 4 = Automatic download and scheduled installation

        RegistryAUOptions{
            Ensure="Present"
            Key="HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
            ValueName="AUOptions"
            ValueType="DWord"
            ValueData="4"

B. Accompanying this code once the value is set I want this schedule to be affiliated for the Target group and referencing the WSUS server

C. Then I want write-host to present the end user of the confirmed schedule time for the target group etc

Hope you guys can help as I have been scratching my head on this one

Viewing all articles
Browse latest Browse all 6937

Trending Articles