Delete Advertisement operation

This Delete Advertisement operation deletes an advertisement. When an advertisement is deleted, the Microsoft System Center Configuration Manager will remove the advertisement from the database and from clients that have already received it.

The following table describes the <items> XML elements for the Delete Advertisement operation:

Elements for the <items> XML element and adapter request for the Delete Advertisement operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: delete-advertisement

Yes

<arguments>

Specifies a list of arguments required for this operation

Yes

<target>

Specifies the connection information for the Microsoft System Center Configuration Manager application

Valid values: The value specified for the <target> element must be the same as that specified for the name attribute of the <config> element in the adapter configuration.

Default value: The first configuration defined in the adapter configuration

No

<advertisement-id>

Specifies a string identifier for the advertisement to be deleted

Note

If <advertisement-id> and <advertisement-name> are specified, <advertisement-id> takes precedence for deletion.

Conditional; required if the <advertisement-name> element is not specified

<advertisement-name>

Specifies the name of the advertisement to be deleted

Note

If <advertisement-id> and <advertisement-name> are specified, <advertisement-id> takes precedence for deletion. If only <advertisement-name> is specified and there are multiple advertisements with the same name, all the advertisements are deleted.

Conditional; required if the <advertisement-id> element is not specified


The following figure shows a sample adapter request for the Delete Advertisement operation:

Sample adapter request for the Delete Advertisement operation

<mssccm-request>
    <operation-name>delete-advertisement</operation-name>
    <arguments>
      <target>config2</target>
      <advertisement-id>123200DF</advertisement-id>
      <advertisement-name>Test Name</advertisement-name>
    </arguments>
  </mssccm-request>

The following figure shows the adapter response for the sample request:

Sample adapter response for the Delete Advertisement operation

<mssccm-response>
  <metadata>
    <response-count>1</response-count>
    <status>success</status>
  </metadata>
  <responses>
    <response>
      <metadata>
        <target>config2</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <message>Advertisement (ID- 123200DF) is deleted successfully.</message>
      </output>
    </response>
  </responses>
</mssccm-response>
Was this page helpful? Yes No Submitting... Thank you

Comments