forked from proxb/PoshWSUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Get-PSWSUSProxyServer.ps1
52 lines (45 loc) · 1.39 KB
/
Get-PSWSUSProxyServer.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-PSWSUSProxyServer {
<#
.SYNOPSIS
This cmdlet gets config settings of proxy to download updates.
.EXAMPLE
Get-PSWSUSProxyServes
Description
-----------
This command will show list of proxy configuration parameters.
.OUTPUTS
Microsoft.UpdateServices.Internal.BaseApi.UpdateServerConfiguration
.NOTES
Name: Get-PSWSUSProxyServer
Author: Dubinsky Evgeny
DateCreated: 1DEC2013
.LINK
http://blog.itstuff.in.ua/?p=62#Get-PSWSUSProxyServer
#>
[CmdletBinding()]
Param()
Begin
{
if($wsus)
{
$config = $wsus.GetConfiguration()
$config.ServerId = [System.Guid]::NewGuid()
$config.Save()
}#endif
else
{
Write-Warning "Use Connect-PSWSUSServer to establish connection with your Windows Update Server"
Break
}
}
Process
{
Write-Verbose "Getting proxy server configuration"
$wsus.GetConfiguration() | select UseProxy, ProxyName, ProxyServerPort, `
ProxyUserDomain, ProxyUserName, `
HasProxyPassword, AllowProxyCredentialsOverNonSsl, `
AnonymousProxyAccess, SslProxyName, `
SslProxyServerPort, UseSeparateProxyForSsl
}
End{}
}