共用方式為


IUpdateServer.GetPublisher Method (String)

 

Applies To: Windows Server Update Services

Gets an instance of IPublisher for publishing a package to the server using the specified SDP File.

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

Syntax

IPublisher GetPublisher(
    string sdpFile
)
IPublisher^ GetPublisher(
    String^ sdpFile
)
abstract GetPublisher : 
        sdpFile:string -> IPublisher
Function GetPublisher (
    sdpFile As String
) As IPublisher

Parameters

  • sdpFile
    Type: System.String

    Full file name and path to the SDP File to be Published/Revised

Return Value

Type: Microsoft.UpdateServices.Administration.IPublisher

IPublisher instance

Exceptions

Exception

Condition

ArgumentNullException

sdpFile is null.

FileNotFoundException

sdpFile cannot be found.

UnauthorizedAccessException

The current user is not a WSUS Administrator.

InvalidDataException

The SDP XML is not valid (e.g. it has a PackageID that is not valid).

InvalidOperationException

Internal error.

Remarks

This operation requires WSUS Administrator privileges.

See Also

GetPublisher Overload
IUpdateServer Interface
Microsoft.UpdateServices.Administration Namespace

Return to top