Поделиться через


AdminProxy.GetUpdateServer Method (String, Boolean, Int32)

 

Applies To: Windows Server Update Services

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

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

Syntax

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

Parameters

  • serverName
    Type: System.String

    Name of the remote machine running WSUS server.

  • useSecureConnection
    Type: System.Boolean

    If set to true, uses SSL 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