Create Advertisement operation

The Create Advertisement operation creates an advertisement that is used to advertise programs on client computers. Advertising a program makes the program available for running on a specified collection of clients.

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

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

Element

Definition

Required

<operation-name>

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

Specifies the name of the advertisement

Yes

<collection-id>

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

Yes

<package-id>

Specifies a string identifier for the advertised package

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

The <schedule> element can be specified multiple times to represent multiple schedules.

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

The following figure shows a sample adapter request for the Create Advertisement operation.

Sample adapter request for the Create Advertisement operation

<mssccm-request>
    <operation-name>create-advertisement</operation-name>
    <arguments>
      <advertisement-name>Advertisement3</advertisement-name>
      <collection-id>SMS00001</collection-id>
      <package-id>45600006</package-id>
      <program-name>Program1</program-name>
      <advertisement-flag>DONOT_FALLBACK</advertisement-flag>
      <schedules>
        <schedule>
          <type>monthly-by-week-day</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>TUESDAY</day>
          <for-number-of-months>1</for-number-of-months>
          <week-order>LAST</week-order>
        </schedule>
      </schedules>
      <schedule-enabled>true</schedule-enabled>
      <schedule-is-gmt>true</schedule-is-gmt>
      <comment>comment8</comment>
      <device-flags>24</device-flags>
      <expiration-time>20130201000000.000000+***</expiration-time>
      <expiration-time-enabled />
      <expiration-time-is-gmt />
      <hierarchy-path>Path7</hierarchy-path>
      <include-sub-collection>true</include-sub-collection>
      <mandatory-count-down />
      <present-time>20110201000000.000000+***</present-time>
      <present-time-enabled>true</present-time-enabled>
      <present-time-is-gmt />
      <priority>HIGH</priority>
      <remote-client-flags>DONT_RUN_NO_LOCAL_DISPPOINT</remote-client-flags>
    </arguments>
  </mssccm-request>


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

Sample adapter response for the Create Advertisement operation

<mssccm-response>
  <metadata>
    <response-count>1</response-count>
    <status>success</status>
  </metadata>
  <responses>
    <response>
      <metadata>
        <target>Server161</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <action-in-progress>UPDATE</action-in-progress>
        <advertisement-flag>DONOT_FALLBACK</advertisement-flag>
        <advertisement-id>45620080</advertisement-id>
        <advertisement-name><![CDATA[Advertisement3]]></advertisement-name>
        <schedules>
          <schedule>
            <type>monthly-by-week-day</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>TUESDAY</day>
            <for-number-of-months>1</for-number-of-months>
            <week-order>LAST</week-order>
          </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>SMS00001</collection-id>
        <comment><![CDATA[comment8]]></comment>
        <device-flags>24</device-flags>
        <expiration-time>20130201000000.000000+***</expiration-time>
        <expiration-time-enabled>False</expiration-time-enabled>
        <expiration-time-is-gmt>False</expiration-time-is-gmt>
        <hierarchy-path><![CDATA[Path7]]></hierarchy-path>
        <include-sub-collection>True</include-sub-collection>
        <mandatory-countdown>0</mandatory-countdown>
        <package-id>45600006</package-id>
        <present-time>20110201000000.000000+***</present-time>
        <present-time-enabled>True</present-time-enabled>
        <present-time-is-gmt>False</present-time-is-gmt>
        <priority>HIGH</priority>
        <program-name><![CDATA[Program1]]></program-name>
        <remote-client-flags>DONT_RUN_NO_LOCAL_DISPPOINT</remote-client-flags>
        <source-site>456</source-site>
        <time-flags>28689</time-flags>
      </output>
    </response>
  </responses>
</mssccm-response>
Was this page helpful? Yes No Submitting... Thank you

Comments