Problem with connectinf to WSUS server

Product: PowerShell Universal
Version: 4.0.0-beta5

Hello
Im not sure that is strictly connected to PowerShell Universal but it does not work no matter what i try on PowerShell Universal web apps, but its working on any other server (including running PS on PU server itself)

So I want to create an app that shows some basic information about computers connected to WSUS server
I can do it in two ways as far as i know:

$WSUS = Get-WsusServer $wsus_server -PortNumber 8530
or
$WSUS = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($wsus_server,'false',8530)

And using first method i got an error:
An error occurred: The term ‘Get-WsusServer’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Using second method I got an error:
Exception calling “GetUpdateServer” with “3” argument(s): “The requested security protocol is not supported.”

And first method is not working no matter what environment I choose (it might not working with PWSH7)
wsus1

Its not even recognized in app web editor.

But it should work with Windows PowerShell 5.1 environment.
Of course module is installed and loaded.

Second method is even stranger. Although PU app is working on http (its still beta version) and im connecting to wsus server on http this error indicate something with ssl instead…

Any help appreciated…

Ok as usually mine fault :slight_smile:
Now its working both ways.
First and main problem was that i have been choosing wsus server names from the UDSelect and i have been passing custom ps object instead of server name to the variable $ wsus_server
And then Get-WsusServer was working fine on PS 5.1
And the second way the problem was the server name as well and also command should be ```
GetUpdateServer($wsus_server,$false,8530) - second parameter must me boolean not string. Strage it was working fine with string in pure PS but not in PU :slight_smile: