다음을 통해 공유


AdminProxy.GetUpdateServerInstance Method ()

 

Applies To: Windows Server Update Services

Gets an IUpdateServer object that represents a local WSUS server.

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

Syntax

public IUpdateServer GetUpdateServerInstance()
public:
IUpdateServer^ GetUpdateServerInstance()
member GetUpdateServerInstance : unit -> IUpdateServer
Public Function GetUpdateServerInstance As IUpdateServer

Return Value

Type: Microsoft.UpdateServices.Administration.IUpdateServer

An object that implements the IUpdateServer interface.

Exceptions

Exception

Condition

WebException

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.GetUpdateServerInstance

See Also

AdminProxy Class
Microsoft.UpdateServices.Administration Namespace

Return to top