Share via


AdminProxy.GetUpdateServer Method (String, Boolean)

 

Applies To: Windows Server Update Services

Gets an IUpdateServer that represents a remote WSUS server of the given name.

Namespace:   Microsoft.UpdateServices.Administration
Assembly:  Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

Syntax

public static IUpdateServer GetUpdateServer(
    string serverName,
    bool useSecureConnection
)
public:
static IUpdateServer^ GetUpdateServer(
    String^ serverName,
    bool useSecureConnection
)
static member GetUpdateServer : 
        serverName:string *
        useSecureConnection:bool -> IUpdateServer
Public Shared Function GetUpdateServer (
    serverName As String,
    useSecureConnection As Boolean
) As IUpdateServer

Parameters

  • serverName
    Type: System.String

    Name of the remote machine running WSUS server.

  • useSecureConnection
    Type: System.Boolean

    If set to true, uses the SSL protocol instead of HTTP.

Return Value

Type: Microsoft.UpdateServices.Administration.IUpdateServer

An object that implements the IUpdateServer interface.

Exceptions

Exception

Condition

ArgumentNullException

serverName is null.

ArgumentOutOfRangeException

serverName is too large.

ArgumentException

serverName does not follow the rules for a valid domain name string.

WebException

The server could not be contacted.

See Also

GetUpdateServer Overload
AdminProxy Class
Microsoft.UpdateServices.Administration Namespace

Return to top