This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
forked from proxb/PoshWSUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet-PSWSUSSyncSchedule.ps1
52 lines (42 loc) · 1.6 KB
/
Get-PSWSUSSyncSchedule.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
43
44
45
46
47
48
49
50
51
52
function Get-PSWSUSSyncSchedule {
<#
.SYNOPSIS
Shows whether the WSUS server synchronizes the updates and sets the number of server-to-server synchronizations a day.
.DESCRIPTION
About SynchronizeAutomaticallyTimeOfDay property.
WSUS stores the time in Coordinated Universal Time. This can affect the local time value that you display. For example,
if the user wants the server to synchronize at 03:00 local time in a standard time zone that is 8 hours west of Coordinated
Universal Time, you would set this property to 11:00 Coordinated Universal Time. When daylight saving time occurs, the server
will continue to synchronize at 11:00 Coordinated Universal Time, however the local time value of this property will be 04:00.
.EXAMPLE
Get-PSWSUSSyncSchedule
.OUTPUTS
Microsoft.UpdateServices.Internal.BaseApi.UpdateServerConfiguration
.NOTES
Name: Get-PSWSUSSyncSchedule
Author: Dubinsky Evgeny
DateCreated: 1DEC2013
.LINK
http://blog.itstuff.in.ua/?p=62#Get-PSWSUSSyncSchedule
#>
[CmdletBinding()]
Param()
Begin
{
if($wsus)
{
$subscription = $wsus.GetSubscription()
}#endif
else
{
Write-Warning "Use Connect-PoshWSUSServer for establish connection with your Windows Update Server"
Break
}
}
Process
{
Write-Verbose "Getting WSUS update source configuration"
$subscription | select SynchronizeAutomatically,SynchronizeAutomaticallyTimeOfDay, NumberOfSynchronizationsPerDay
}
End{}
}