forked from proxb/PoshWSUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet-PSWSUSServer.ps1
56 lines (47 loc) · 1.5 KB
/
Get-PSWSUSServer.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
53
54
55
56
function Get-PSWSUSServer {
<#
.SYNOPSIS
Retrieves connection and configuration information from the WSUS server.
.DESCRIPTION
Retrieves connection and configuration information from the WSUS server.
.PARAMETER ShowConfiguration
Lists more configuration information from WSUS Server
.NOTES
Name: Get-PSWSUSServer
Author: Boe Prox
DateCreated: 24SEPT2010
.LINK
https://learn-powershell.net
.EXAMPLE
Get-PSWSUSServer
Description
-----------
This command will display basic information regarding the WSUS server.
.EXAMPLE
Get-PSWSUSServer -ShowConfiguration
Description
-----------
This command will list out more detailed information regarding the configuration of the WSUS server.
#>
[cmdletbinding()]
Param(
[Parameter(
Position = 0,
ValueFromPipeline = $False)]
[switch]$ShowConfiguration
)
Begin {
if(-not $wsus)
{
Write-Warning "Use Connect-PSWSUSServer to establish connection with your Windows Update Server"
Break
}
}
Process {
If ($PSBoundParameters['ShowConfiguration']) {
$wsus.GetConfiguration()
} Else {
$wsus
}
}
}