IUpdateServer.GetPublisher Method (String, Boolean)

 

Applies To: Windows Server Update Services

Gets an instance of IPublisher for publishing a package to the server by using the specified SDP file. This overload also allows you to specify whether or not the certificate should be signed with a time stamp.

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

Syntax

IPublisher GetPublisher(
    string sdpFile,
    bool signCertWithoutTimeStamp
)
IPublisher^ GetPublisher(
    String^ sdpFile,
    bool signCertWithoutTimeStamp
)
abstract GetPublisher : 
        sdpFile:string *
        signCertWithoutTimeStamp:bool -> IPublisher
Function GetPublisher (
    sdpFile As String,
    signCertWithoutTimeStamp As Boolean
) As IPublisher

Parameters

  • sdpFile
    Type: System.String

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

  • signCertWithoutTimeStamp
    Type: System.Boolean

    A flag that specifies if the certificate should be signed with a time stamp.

Return Value

Type: Microsoft.UpdateServices.Administration.IPublisher

Returns IPublisher.

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.

NotSupportedException

When the server version is less than WSUS 3 with SP2.

Remarks

This operation requires WSUS Administrator privileges.

See Also

GetPublisher Overload
IUpdateServer Interface
Microsoft.UpdateServices.Administration Namespace

Return to top