Update Advertisement operation

The Update Advertisement operation updates an advertisement.

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

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

Element

Definition

Required

<operation-name>

Specifies the name of the operation: update-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

<query>

Contains the elements that are used to locate the advertisement to be updated

The <query> element can have following child elements:

  • <all>
  • <action-in-progress>
  • <advertisement-flag>
  • <advertisement-id>
  • <advertisement-name>
  • <collection-id>
  • <comment>
  • <device-flags>
  • <expiration-time>
  • <hierarchy-path>
  • <include-sub-collection>
  • <mandatory-countdown>
  • <package-id, present-time>
  • <priority>
  • <program-name>
  • <remote-client-flags>
  • <source-site>
  • <time-flags>

Yes

<update>

Contains the elements that are used to update the advertisement

The <update> element can have following child elements. At least one of the following elements is present within the <update> element to update the advertisement:

  • <advertisement-name>
  • <collection-id>
  • <package-id>
  • <program-name>
  • <advertisement-flag>
  • <schedules>
  • <schedule>
  • <schedule-enabled>
  • <schedule-is-gmt>
  • <comment>
  • <device-flags>
  • <expiration-time>
  • <expiration-time-enabled>
  • <expiration-time-is-gmt>
  • <hierarchy-path>
  • <include-sub-collection>
  • <mandatory-count-down>
  • <present-time>
  • <present-time-enabled>
  • <present-time-is-gmt>
  • <priority>
  • <remote-client-flags>

Yes

<all>

Specifies whether all advertisements are updated

It is an empty element. It does not contain any value.

Note

Other elements that may be present with the <all> element are ignored.

No

<action-in-progress>

Specifies the current action being performed on the package by Microsoft System Center Configuration Manager

Valid values: NONE, UPDATE, ADD

No

<advertisement-id>

Specifies a string identifier for the advertisement

No

<advertisement-name>

Specifies the name of the advertisement

No

<collection-id>

Specifies a string identifier for the collection where the advertisement is announced

No

<package-id>

Specifies a string identifier for the package which is being advertised

Yes

<program-name>

Specifies the name of the program being advertised

Yes

<advertisement-flag>

Specifies flags that indicate how the advertisement is announced to the user

Valid values:

  • IMMEDIATE = 5
  • ONSYSTEMSTARTUP = 8
  • ONUSERLOGON = 9
  • ONUSERLOGOFF = 10
  • WINDOWS_CE = 15
  • DONOT_FALLBACK = 17
  • ENABLE_TS_FROM_CD_AND_PXE = 18
  • OVERRIDE_SERVICE_WINDOWS = 20
  • REBOOT_OUTSIDE_OF_SERVICE_WINDOWS = 21
  • WAKE_ON_LAN_ENABLED = 22
  • SHOW_PROGRESS = 23
  • NO_DISPLAY = 25
  • ONSLOWNET = 26

No

<schedules>

Specifies the parent element for the <schedule> element

No

<schedule>

Specifies the schedule information

Specify the <schedule> element multiple times for multiple schedules.

The <schedule> element can have the following child elements:

  • <type>
  • <day-duration>
  • <hour-duration>
  • <minute-duration>
  • <start-time>
  • <is-gmt>
  • <day-span>
  • <hour-span>
  • <minute-span>
  • <day>
  • <for-number-of-weeks>
  • <month-day>
  • <for-number-of-months>
  • <week-order>

No

<type>

Specifies the type of schedule

Valid values:

  • non-recurring
  • custom
  • weekly
  • monthly-by-date
  • monthly-by-week-day

Conditional; required if the <schedule> element is specified

<day-duration>

Specifies the number of days for which the scheduled action should occur

The value 0 indicates that the scheduled action continues indefinitely.

Valid values: 0 (default) to 31

No

<hour-duration>

Specifies the number of hours for which the scheduled action should occur

Valid values: 0 (default) to 23

No

<minute-duration>

Specifies the number of minutes for which the scheduled action should occur

Valid values: 0 (default) to 59

No

<start-time>

Specifies the date and time when the scheduled action takes place

Valid values: Date and time input in the following format:

YYYYmmDDhhMMss.MMMMMM+***

YYYY: year; mm: month; DD: date; hh: hour; MM: minute; ss: second; MMMMMM: mili second; ***: Offset from local time

Default value: 19700201000000.000000+***

No

<is-gmt>

Specifies whether the value specified for the <start-time> element is in Coordinated Universal Time (UTC)

Valid values: true, false

No

<day-span>

Specifies the number of days spanning schedule intervals

Valid values: 0 (default) to 31

Note

The <day-span> element is valid only when the value specified for the <type> element is custom.

No

<hour-span>

Specifies the number of hours spanning schedule intervals

Valid values: 0 (default) to 23

Note

The <hour-span> element is valid only when the value specified for the <type> element is custom.

No

<minute-span>

Specifies the number of minutes spanning schedule intervals

Valid values: 0 (default) to 59

Note

The <minute-span> element is valid only when the value specified for the <type> element is custom.

No

<day>

Specifies the day of the week when the event is scheduled to occur

Valid values: SUNDAY (default) through SATURDAY

Note

The <day> element is valid only when the value specified for the <type> element is either weekly or monthly-by-week-day.

No

<for-number-of-weeks>

Specifies the number of weeks for recurrence

Valid values: 1 (default) to 4

Note

The <for-number-of-weeks> element is valid only when the value specified for the <type> element is weekly.

No

<month-day>

Specifies the day of the month on which the action occurs

The value 0 indicates the last day of the month.

Valid values: 0 (default) to 31

Note

The <month-day> element is valid only when the value specified for the <type> element is monthly-by-date.

No

<for-number-of-months>

Specifies the number of months for recurrence

Valid values: 1 (default) to 12

Note

The <for-number-of-months> element is valid only when the value specified for the <type> element is either monthly-by-date or monthly-by-week-day.

No

<week-order>

Specifies the week of the month when the event is scheduled to occur

Valid values: LAST (default), FIRST, SECOND, THIRD, FOURTH

Note

The <week-order> element is valid only when the value specified for the <type> element is monthly-by-week-day.

No

<schedule-enabled>

Indicates whether the schedules specified by the <schedule> element are active

True indicates active and false indicates not-active.

Valid values: true, false (default)

No

<schedule-is-gmt>

Specifies whether the scheduled time is in Universal Metric Time (UMT)

Valid values: true, false (default)

No

<comment>

Specifies any comment for the advertisement

Valid values: Any string

Default value: None

No

<device-flags>

Specifies the flags describing the device

Valid values:

  • 0: Create an advertisement without assigning any flags (default)
  • 24: Always assign a program to the client
  • 25: Assign only if the device is currently connected to a high-bandwidth connection (default above 60 KBps)
  • 26: Assign only if the device is docked, that is, it is attached to a desktop that is using ActiveSync

No

<expiration-time>

Specifies the date and time when the advertisement is no longer available to clients

Valid values: Date and time input in the following format:

YYYYmmDDhhMMss.MMMMMM+***

YYYY: year; mm: month; DD: date; hh: hour; MM: minute; ss: second; MMMMMM: mili second; ***: Offset from local time

Default value: 19900101000000.000000+***

No

<expiration-time-enabled>

Specifies whether the advertisement expires at the time specified in the <expiration-time> element

Valid values: true, false (default)

No

<expiration-time-is-gmt>

Specifies whether the expiration time is in Universal Metric Time (UMT)

Valid values: true, false (default)

No

<hierarchy-path>

Specifies the hierarchy path

Valid values: Any string

No

<include-sub-collection>

Specifies whether the advertisement is advertised to the sub-collections of the specified collection

Valid values: true (default), false

No

<mandatory-count-down>

Specifies the duration in minutes for which the operating system deployment user notification is shown

Valid values: 0 (default) to 90

No

<present-time>

Specifies the date and time when the advertisement is made available to clients

Valid values: Date and time input in the following format:

YYYYmmDDhhMMss.MMMMMM+***

YYYY: year; mm: month; DD: date; hh: hour; MM: minute; ss: second; MMMMMM: mili second; ***: Offset from local time

Default value: 19900101000000.000000+***

No

<present-time-enabled>

Specifies whether the value specified for the <present-time> element is enforced by the Configuration Manager

Valid values: true (default), false

No

<present-time-is-gmt>

Specifies whether the value specified for the <present-time> element is in Universal Metric Time (UMT)

Valid values: true, false (true)

No

<priority>

Specifies the priority of the advertisement

Valid values:

  • HIGH = 1
  • NORMAL = 2 (default)
  • LOW = 3

No

<remote-client-flags>

Specifies how the program should run when the client is connected either locally or remotely to a distribution point

Valid values:

  • BATTERY_POWER = 0
  • RUN_FROM_CD = 1
  • DOWNLOAD_FROM_CD = 2
  • RUN_FROM_LOCAL_DISPPOINT = 3
  • DOWNLOAD_FROM_LOCAL_DISPPOINT = 4
  • DONT_RUN_NO_LOCAL_DISPPOINT = 5
  • DOWNLOAD_FROM_REMOTE_DISPPOINT = 6
  • RUN_FROM_REMOTE_DISPPOINT = 7
  • DOWNLOAD_ON_DEMAND_FROM_LOCAL_DP = 8
  • DOWNLOAD_ON_DEMAND_FROM_REMOTE_DP = 9
  • BALLOON_REMINDERS_REQUIRED = 10
  • RERUN_ALWAYS = 11
  • RERUN_NEVER = 12
  • RERUN_IF_FAILED = 13
  • RERUN_IF_SUCCEEDED = 14

No

<site-code>

Specifies the code of the Microsoft System Center Configuration Manager site where the advertisement originates

No

<time-flags>

Specifies the flags that duplicate information in the time-related properties

Valid values:

  • ENABLE_PRESENT
  • ENABLE_EXPIRATION
  • ENABLE_AVAILABLE
  • ENABLE_UNAVAILABLE
  • ENABLE_MANDATORY
  • GMT_PRESENT
  • GMT_EXPIRATION
  • GMT_AVAILABLE
  • GMT_UNAVAILABLE
  • GMT_MANDATORY

No

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

Sample adapter request for the Update Advertisement operation

<mssccm-request>
    <operation-name>update-advertisement</operation-name>
    <arguments>
      <target>config2</target>
      <query>
        <action-in-progress>UPDATE</action-in-progress>
        <advertisement-flag>ENABLE_TS_FROM_CD_AND_PXE</advertisement-flag>
        <advertisement-id>123200DF</advertisement-id>
        <advertisement-name><![CDATA[aaa]]></advertisement-name>
        <collection-id>SMSDM003</collection-id>
        <comment>adv comment</comment>
        <device-flags>24</device-flags>
        <expiration-time>20120201000000.000000+***</expiration-time>
        <hierarchy-path>any path</hierarchy-path>
        <include-sub-collection>False</include-sub-collection>
        <mandatory-countdown>10</mandatory-countdown>
        <package-id>12300001</package-id>
        <present-time>20110201000000.000000+***</present-time>
        <priority>HIGH</priority>
        <program-name>p2</program-name>
        <remote-client-flags>DONT_RUN_NO_LOCAL_DISPPOINT</remote-client-flags>
        <source-site>123</source-site>
        <time-flags>29459</time-flags>
      </query>
      <update>
        <advertisement-name><![CDATA[adv002]]></advertisement-name>
        <collection-id>SMS00002</collection-id>
        <package-id>12300001</package-id>
        <program-name><![CDATA[p2]]></program-name>
        <advertisement-flag>ENABLE_TS_FROM_CD_AND_PXE</advertisement-flag>
        <schedules>
          <schedule>
            <type>non-recurring</type>
            <day-duration>2</day-duration>
            <hour-duration>1</hour-duration>
            <minute-duration>1</minute-duration>
            <start-time>20110201000000.000000+***</start-time>
            <is-gmt>true</is-gmt>
          </schedule>
          <schedule>
            <type>custom</type>
            <day-duration>2</day-duration>
            <hour-duration>1</hour-duration>
            <minute-duration>1</minute-duration>
            <start-time>20110201000000.000000+***</start-time>
            <is-gmt>true</is-gmt>
            <day-span>1</day-span>
            <hour-span>1</hour-span>
            <minute-span>1</minute-span>
          </schedule>
        </schedules>
        <schedule-enabled>true</schedule-enabled>
        <schedule-is-gmt>true</schedule-is-gmt>
        <comment><![CDATA[adv comment]]></comment>
        <device-flags>24</device-flags>
        <expiration-time>20120201000000.000000+***</expiration-time>
        <expiration-time-enabled>true</expiration-time-enabled>
        <expiration-time-is-gmt>true</expiration-time-is-gmt>
        <hierarchy-path><![CDATA[any path]]></hierarchy-path>
        <include-sub-collection>true</include-sub-collection>
        <mandatory-count-down>10</mandatory-count-down>
        <present-time>20110201000000.000000+***</present-time>
        <present-time-enabled>true</present-time-enabled>
        <present-time-is-gmt>true</present-time-is-gmt>
        <priority>HIGH</priority>
        <remote-client-flags>DONT_RUN_NO_LOCAL_DISPPOINT</remote-client-flags>
      </update>
    </arguments>
</mssccm-request>



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

Sample adapter response for the Update 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>
        <action-in-progress>UPDATE</action-in-progress>
        <advertisement-flag>ENABLE_TS_FROM_CD_AND_PXE</advertisement-flag>
        <advertisement-id>123200DF</advertisement-id>
        <advertisement-name><![CDATA[adv002]]></advertisement-name>
        <schedules>
          <schedule>
            <type>non-recurring</type>
            <day-duration>2</day-duration>
            <hour-duration>1</hour-duration>
            <minute-duration>1</minute-duration>
            <is-gmt>True</is-gmt>
            <start-time>20110201000000.000000+***</start-time>
          </schedule>
          <schedule>
            <type>custom</type>
            <day-duration>2</day-duration>
            <hour-duration>1</hour-duration>
            <minute-duration>1</minute-duration>
            <is-gmt>True</is-gmt>
            <start-time>20110201000000.000000+***</start-time>
            <day-span>1</day-span>
            <hour-span>0</hour-span>
            <minute-span>0</minute-span>
          </schedule>
        </schedules>
        <assigned-schedule-enabled>True</assigned-schedule-enabled>
        <assigned-schedule-is-gmt>True</assigned-schedule-is-gmt>
        <assignment-id>0</assignment-id>
        <collection-id>SMS00002</collection-id>
        <comment><![CDATA[adv comment]]></comment>
        <device-flags>24</device-flags>
        <expiration-time>20120201000000.000000+***</expiration-time>
        <expiration-time-enabled>True</expiration-time-enabled>
        <expiration-time-is-gmt>True</expiration-time-is-gmt>
        <hierarchy-path><![CDATA[any path]]></hierarchy-path>
        <include-sub-collection>True</include-sub-collection>
        <mandatory-countdown>10</mandatory-countdown>
        <package-id>12300001</package-id>
        <present-time>20110201000000.000000+***</present-time>
        <present-time-enabled>True</present-time-enabled>
        <present-time-is-gmt>True</present-time-is-gmt>
        <priority>HIGH</priority>
        <program-name><![CDATA[p2]]></program-name>
        <remote-client-flags>DONT_RUN_NO_LOCAL_DISPPOINT</remote-client-flags>
        <source-site>123</source-site>
        <time-flags>29459</time-flags>
      </output>
    </response>
  </responses>
</mssccm-response>
Was this page helpful? Yes No Submitting... Thank you

Comments