Connect-PoshWSUSServer localhost -port "8531"

May 13, 2016 at 5:57 AM
Edited May 13, 2016 at 5:59 AM
Hi all,
first, thanks for this great "tool-kit" :)

For years we used this powershell code to get a detailed report of our clients
Import-Module PoshWSUS
Connect-PoshWSUSServer localhost -port "8530"
$WSUSDate = Get-Date -format yyyy-MM-dd
Get-PoshWSUSUpdateSummaryPerClient | select-object Computer,LastUpdated,NeededCount,FailedCount,InstalledPendingRebootCount | Sort-Object NeededCount -Descending | Format-Table -AutoSize
But yesterday we had to move from http (8530) to https (8531) because of a policy in our environment. I tried to connect via the new ssl port.
Import-Module PoshWSUS
Connect-PoshWSUSServer wsus.org.local -port "8531"
$WSUSDate = Get-Date -format yyyy-MM-dd
Get-PoshWSUSUpdateSummaryPerClient | select-object Computer,LastUpdated,NeededCount,FailedCount,InstalledPendingRebootCount | Sort-Object NeededCount -Descending | Format-Table -AutoSize
But I always get the following message:
WARNING: Unable to connect to localhost!
Can anyone find my fault?
EDIT: Port 8531 is reachable (Port is opend at windows firewall) and the dns-name "wsus.org.local" could be resolved, and it show me the correct IP.
May 13, 2016 at 6:03 AM
I found my fault "-SecureConnection" was missing
Connect-PoshWSUSServer wsus.org.local -port "8531" -SecureConnection
Marked as answer by stefan_b_1984 on 5/12/2016 at 11:04 PM