-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
View ReleaseNotes.txt to see all of the latest changes
- Loading branch information
Showing
38 changed files
with
1,258 additions
and
693 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
PoshWSUS 2.3.1 Release Notes | ||
Last Updated: | ||
|
||
|
||
------------- | ||
|MISC Updates| | ||
------------- | ||
* Updated Type and Format files | ||
* Changed Global scope WSUS variable to Script | ||
* Added Script scope _wsusconfig variable | ||
|
||
------------------- | ||
|Updated Functions| | ||
------------------- | ||
Get-PSWSUSUpdateApproval | ||
Disconnect-PSWSUSServer | ||
Connect-PSWSUSServer | ||
Disconnect-PSWSUSServer | ||
Get-PSWSUSConfigEnabledUpdateLanguages | ||
Get-PSWSUSConfigSupportedUpdateLanguages | ||
Get-PSWSUSConfigUpdateFiles | ||
Get-PSWSUSConfigUpdateSource | ||
Set-PSWSUSConfigEnabledUpdateLanguages | ||
Set-PSWSUSConfigProxyServer | ||
Set-PSWSUSConfigTargetingMode | ||
Set-PSWSUSConfigUpdateFiles | ||
Set-PSWSUSConfigUpdateSource | ||
Get-PSWSUSClientGroupMembership | ||
Get-PSWSUSCommand | ||
Get-PSWSUSEvent | ||
Get-PSWSUSSyncHistory | ||
Resume-PSWSUSUpdateDownload | ||
Remove-PSWSUSClientFromGroup | ||
Remove-PSWSUSClient | ||
Add-PSWSUSClientToGroup | ||
Get-PSWSUSClientPerUpdate | ||
|
||
--------------- | ||
|New Functions| | ||
--------------- | ||
|
||
------------------- | ||
|Removed Functions| | ||
------------------- | ||
Get-PSWSUSSyncEvent | ||
Resume-PSWSUSDownload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,93 @@ | ||
Function Connect-PSWSUSServer | ||
{ | ||
Function Connect-PSWSUSServer { | ||
<# | ||
.SYNOPSIS | ||
Make the initial connection to a WSUS Server. | ||
.DESCRIPTION | ||
Make the initial connection to a WSUS Server. Only one concurrent connection is allowed. | ||
.PARAMETER WsusServer | ||
Name of WSUS server to connect to. Defaults to local host. | ||
.PARAMETER SecureConnection | ||
Determines if a secure connection will be used to connect to the WSUS server. Defaults to un-secured. | ||
.PARAMETER Port | ||
Port number to connect to. Default is Port 8530 if not used. Typical ports are 80 (http), 443 (https), 8350 (http) and 8351 (https) | ||
.NOTES | ||
Name: Connect-PSWSUSServer | ||
Author: Boe Prox | ||
Editor: Friedrich Weinmann | ||
DateCreated: 24SEPT2010 | ||
DateModified: 26MAR2015 | ||
.LINK | ||
https://learn-powershell.net | ||
.SYNOPSIS | ||
Make the initial connection to a WSUS Server. | ||
.DESCRIPTION | ||
Make the initial connection to a WSUS Server. Only one concurrent connection is allowed. | ||
.PARAMETER WsusServer | ||
Name of WSUS server to connect to. If not value is given, an attempt to read the value from registry will occur. | ||
.PARAMETER SecureConnection | ||
Determines if a secure connection will be used to connect to the WSUS server. If not used, then a non-secure | ||
connection will be used. | ||
.PARAMETER Port | ||
Port number to connect to. Default is Port "80" if not used. Accepted values are "80","443","8350" and "8351" | ||
.NOTES | ||
Name: Connect-PSWSUSServer | ||
Author: Boe Prox | ||
Version History: | ||
1.2 | 17 Feb 2015 | ||
-Renamed to Connect-PSWSUSServer | ||
-Allow read of registry for WUServer and Port | ||
1.0 | 24 Sept 2010 | ||
-Initial Version | ||
.LINK | ||
https://learn-powershell.net | ||
.EXAMPLE | ||
Connect-PSWSUSServer "server1" | ||
.EXAMPLE | ||
Connect-PSWSUSServer -PSWSUSserver "server1" | ||
Description | ||
----------- | ||
This command will establish the connection to the WSUS using an unsecure connection on port 8530. | ||
.EXAMPLE | ||
Connect-PSWSUSServer "server1" $true 443 | ||
Description | ||
----------- | ||
This command will make the connection to the WSUS using an unsecure port (Default:80). | ||
.EXAMPLE | ||
Connect-PSWSUSServer -WSUSserver "server1" -SecureConnection | ||
Description | ||
----------- | ||
This command will establish a secure connection to the WSUS server on port 443. | ||
.EXAMPLE | ||
Connect-PSWSUSServer "server1" -port 8530 | ||
Description | ||
----------- | ||
This command will make a secure connection (Default: 443) to a WSUS server. | ||
.EXAMPLE | ||
Connect-PSWSUSServer -WSUSserver "server1" -port 8530 | ||
Description | ||
----------- | ||
This command will make the connection to the WSUS using a defined port 8530. | ||
#> | ||
[cmdletbinding(ConfirmImpact = 'low')] | ||
Param ( | ||
[Parameter(Position = 0, ValueFromPipeline = $True)] | ||
[Alias('WSUS', 'WSUSServer', 'Server', 'Name', 'Computer')] | ||
[string] | ||
$ComputerName = $env:COMPUTERNAME, | ||
|
||
[Parameter(Position = 1)] | ||
[Alias('SSL')] | ||
[bool] | ||
$SecureConnection = $false, | ||
|
||
[Parameter(Position = 2)] | ||
[int] | ||
$Port = $DefaultWsusPort | ||
) | ||
Begin | ||
{ | ||
Write-Debug "[Start] Connecting to WSUS" | ||
} | ||
Process | ||
{ | ||
if ($PSCmdlet.ShouldProcess($ComputerName, "Establishing Connection to WSUS $ComputerName using Port $Port ($(if ($SecureConnection) { "SSL" } else { "no SSL" }))")) | ||
{ | ||
# Make connection to WSUS server | ||
Try | ||
{ | ||
$Global:wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($ComputerName, $SecureConnection, $Port) | ||
Write-Output $Wsus | ||
} | ||
Catch | ||
{ | ||
Write-Warning "Unable to connect to $($ComputerName)!`n$($error[0])" | ||
} | ||
} | ||
} | ||
End | ||
{ | ||
Write-Debug "[End] Connecting to WSUS" | ||
} | ||
} | ||
Description | ||
----------- | ||
This command will make the connection to the WSUS using a defined port 8530. | ||
#> | ||
[cmdletbinding()] | ||
Param( | ||
[Parameter(ValueFromPipeline = $True)] | ||
[Alias('Computername')] | ||
[string]$WsusServer, | ||
|
||
[Parameter()] | ||
[switch]$SecureConnection, | ||
|
||
[Parameter()] | ||
[ValidateSet("80","443","8530","8531" )] | ||
[int]$Port = 80 | ||
) | ||
Begin { | ||
$ErrorActionPreference = 'Stop' | ||
If ($PSBoundParameters['SecureConnection']) { | ||
$Secure = $True | ||
} Else { | ||
$Secure = $False | ||
} | ||
} | ||
Process { | ||
If (-NOT $PSBoundParameters.ContainsKey('WSUSServer')) { | ||
#Attempt to pull WSUS server name from registry key to use | ||
If ((Get-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name WUServer).WUServer -match '(?<Protocol>^http(s)?)(?:://)(?<Computername>(?:(?:\w+(?:\.)?)+))(?::)?(?<Port>.*)') { | ||
$WsusServer = $Matches.Computername | ||
$Port = $Matches.Port | ||
} | ||
} | ||
#Make connection to WSUS server | ||
Try { | ||
Write-Verbose "Connecting to $($WsusServer) <$($Port)>" | ||
$Script:Wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($wsusserver,$Secure,$port) | ||
$Script:_wsusconfig = $Wsus.GetConfiguration() | ||
Write-Output $Wsus | ||
} Catch { | ||
Write-Warning "Unable to connect to $($wsusserver)!`n$($error[0])" | ||
} Finally { | ||
$ErrorActionPreference = 'Continue' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.