Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
engrit-epm
sccm-ts-scripts
Commits
170b6671
Commit
170b6671
authored
Jun 16, 2021
by
mseng3
Browse files
Update update-windows-post-ts.ps1
parent
1b13c0d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
update-windows-post-ts/update-windows-post-ts.ps1
View file @
170b6671
#This REQUIRES PowerShell 5.0
#This REQUIRES PowerShell 5.0
#Parameter Details
#log - log location full path i.e. c:\bin\wuinstall.log
param
(
...
...
@@ -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."
exit
\ No newline at end of file
exit
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment