Commit 170b6671 authored by mseng3's avatar mseng3
Browse files

Update update-windows-post-ts.ps1

parent 1b13c0d1
#This REQUIRES PowerShell 5.0
#This REQUIRES PowerShell 5.0
#Parameter Details
#log - log location full path i.e. c:\bin\wuinstall.log
......@@ -21,7 +21,7 @@ echo "Checking if ServiceID matches ID for Microsoft Update (7971f918-a847-4430-
if($service -NotMatch "7971f918-a847-4430-9279-4a52d1efe18d") {
echo "ServiceID does not match or doesn't exist."
echo "Registering service..."
Add-WUServiceManager -ServiceID "7971f918-a847-4430-9279-4a52d1efe18d" -Confirm:$false | Out-File $log -Append
Add-WUServiceManager -ServiceID "7971f918-a847-4430-9279-4a52d1efe18d" -Confirm:$false
else {
echo "ServiceID matched. Presumably this means the service is already registered."
......@@ -32,4 +32,4 @@ echo "Attempting to get and install all updates that are not drivers or language
Get-WuInstall -MicrosoftUpdate -NotCategory Drivers,Language -NotKBArticleID KB2876229 -AcceptAll -IgnoreReboot -Confirm | Out-File $log -Append
echo "Done with updates."
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment