Skip to content

HTTP requests fail when SSL is required #33

@culorsung

Description

@culorsung

Running anything that interacts with WSUS (invoke-wsusservercleanup, get-wsusclassification, etc) when SSL is required results in an error like this:

Get-WsusClassification : The request failed with HTTP status 400: Bad Request.
At C:\optimize-wsus.ps1:827 char:5
+     Get-WsusClassification | Where-Object -FilterScript {$_.Classific ...
+     ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Updat...ficationCommand:GetWsusClassificationCommand) [Get-WsusClassification], WebException
    + FullyQualifiedErrorId : ServerIsInvalid,Microsoft.UpdateServices.Commands.GetWsusClassificationCommand

Adding something like this to these lines resolves it, but that doesn't feel like the best solution:

Get-WsusServer -UseSsl -Name <fqdn> -PortNumber 8531 | <command>

Am I missing something, or should I figure out a way to make this happen dynamically?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions