forked from proxb/PoshWSUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Get-PSWSUSSyncProgress.ps1
42 lines (36 loc) · 997 Bytes
/
Get-PSWSUSSyncProgress.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function Get-PSWSUSSyncProgress {
<#
.SYNOPSIS
Displays the current progress of a WSUS synchronization.
.DESCRIPTION
Displays the current progress of a WSUS synchronization.
.NOTES
Name: Get-PSWSUSSyncProgress
Author: Boe Prox
DateCreated: 24SEPT2010
.LINK
https://learn-powershell.net
.EXAMPLE
Get-PSWSUSSyncProgress
Description
-----------
This command will show you the current status of the WSUS sync.
#>
[cmdletbinding()]
Param ()
Begin {
if($wsus)
{
$sub = $wsus.GetSubscription()
}#endif
else
{
Write-Warning "Use Connect-PSWSUSServer to establish connection with your Windows Update Server"
Break
}
}
Process {
#Gather all child servers in WSUS
$sub.GetSynchronizationProgress()
}
}