Comments  
Abraham
0 # IssuesAbraham 2016-06-07 04:54
Hi,

I receive the following error, are you able to point me to a resolution?

Exception calling "GetUpdates" with "0" argument(s): "The operation has timed out"
At C:\Users\Userx\Desktop\WSUSS.ps1:16 char:1
+ $updates = $wsus.GetUpdates() | where {$_.IsApproved -eq $true};
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
Reply | Reply with quote | Quote
Super User
0 # RE: IssuesSuper User 2016-06-07 08:35
Hi!

The most possible reason for this issue is very large amount of updates objects in the WSUS-server.

I already had this issue, and to solve is, I had to decline a number of "old" update and clean database (it's from WSUS console).
Reply | Reply with quote | Quote
Diones
0 # ErroDiones 2020-10-21 14:42
Recebi este erro:
Exception calling "GetUpdateServer" with "2" argument(s): "Invalid URI: Invalid port specified."
At C:\Users\diones.ferreira\Documents\extracaowsus.ps1:8 char:1
+ $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpda ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UriFormatException

You cannot call a method on a null-valued expression.
At C:\Users\diones.ferreira\Documents\extracaowsus.ps1:15 char:1
+ $updates = $wsus.GetUpdates() | where {$_.IsApproved -eq $true};
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Reply | Reply with quote | Quote
Super User
0 # RE: ErroSuper User 2020-11-13 08:50
Quoting Diones:
Recebi este erro:
Exception calling "GetUpdateServer" with "2" argument(s): "Invalid URI: Invalid port specified."
At C:\Users\diones.ferreira\Documents\extracaowsus.ps1:8 char:1
+ $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpda ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UriFormatException

You cannot call a method on a null-valued expression.
At C:\Users\diones.ferreira\Documents\extracaowsus.ps1:15 char:1
+ $updates = $wsus.GetUpdates() | where {$_.IsApproved -eq $true};
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull


Hi!

Is your WSUS server use some specific port?
docs.microsoft.com/en-us/previous-versions/windows/desktop/aa349325(v=vs.85)

Try to update 8th string with something like:
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer('wsus10.domain.local',$False, 80)

where 80 - port number. Put yours there.
Reply | Reply with quote | Quote
Add comment