AdminProxy.GetRemoteUpdateServerInstance Method (String, Boolean, Int32)
Applies To: Windows Server Update Services
Connects to the specified remote WSUS server.
Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
Syntax
public IUpdateServer GetRemoteUpdateServerInstance(
string serverName,
bool useSecureConnection,
int portNumber
)
public:
IUpdateServer^ GetRemoteUpdateServerInstance(
String^ serverName,
bool useSecureConnection,
int portNumber
)
member GetRemoteUpdateServerInstance :
serverName:string *
useSecureConnection:bool *
portNumber:int -> IUpdateServer
Public Function GetRemoteUpdateServerInstance (
serverName As String,
useSecureConnection As Boolean,
portNumber As Integer
) As IUpdateServer
Parameters
serverName
Type: System.StringThe name of the remote machine running WSUS server.
useSecureConnection
Type: System.BooleanIf set to false, uses HTTP to communicate with the server. If set to true, uses SSL to communicate with the server.
portNumber
Type: System.Int32The port number to connect to on the remote WSUS server.
Return Value
Type: Microsoft.UpdateServices.Administration.IUpdateServer
An IUpdateServer interface that can be used to interact with the specified remote WSUS server.
Exceptions
Exception
Condition
serverName is null.
serverName is too long.
serverName does not follow the rules for a valid domain name string.
The server could not be contacted.
Remarks
This method exists so it can be called by scripts, which cannot access static members. To use this method, you must first instantiate an AdminProxy object.
After retrieving IUpdateServer, you should call PreferredCulture to specify the language code that WSUS uses to return strings.
Examples
Dim updateServer as IUpdateServer
Dim proxy as New AdminProxy
updateServer = AdminProxy.GetRemoteUpdateServerInstance("MyRemoteServer", true, 8530)
See Also
AdminProxy Class
Microsoft.UpdateServices.Administration Namespace
Return to top