The SMS_Advertisement Windows Management Instrumentation (WMI) class is an SMS Provider server class, in System Center 2012 Configuration Manager, that represents an advertisement used to announce software package programs that are available for running on clients.
The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.
Class SMS_Advertisement : SMS_BaseClass { UInt32 ActionInProgress; UInt32 AdvertFlags; String AdvertisementID; String AdvertisementName; SMS_ScheduleToken AssignedSchedule[]; Boolean AssignedScheduleEnabled; Boolean AssignedScheduleIsGMT; UInt32 AssignmentID; String CollectionID; String Comment; UInt32 DeviceFlags; DateTime ExpirationTime; Boolean ExpirationTimeEnabled; Boolean ExpirationTimeIsGMT; String HierarchyPath; Boolean IncludeSubCollection; UInt8 ISVData[]; UInt32 ISVDataSize; UInt32 MandatoryCountdown; UInt32 OfferType; String PackageID; DateTime PresentTime; Boolean PresentTimeEnabled; Boolean PresentTimeIsGMT; UInt32 Priority; String ProgramName; UInt32 RemoteClientFlags; String SourceSite; UInt32 TimeFlags; }; |
Methods
The following table lists the methods in the SMS_Advertisement class.
Method | Description | ||
---|---|---|---|
Gets the advertisement IDs that are targeted to the resource. |
|||
Sets the source site code for the advertisement. |
|||
Sets the source site to the current site, unlocking the advertisement.
|
Properties
- ActionInProgress
- Data type: UInt32Access type: Read-onlyQualifiers:
[read, enumeration]Current action being performed on the package by
Configuration Manager. Possible values are:
Value Description 0
NONE
1
UPDATE
2
ADD
- AdvertFlags
- Data type: UInt32Access type: Read/WriteQualifiers:
[bits]Flags indicating how the advertisement should be announced to
the user. Possible values are listed below. The default value is 0.
Hexadecimal (Bit) Description 0x00000020 (5)
IMMEDIATE. Announce the advertisement to the user immediately.
0x00000100 (8)
ONSYSTEMSTARTUP. Announce the advertisement to the user on system startup.
0x00000200 (9)
ONUSERLOGON. Announce the advertisement to the user on logon.
0x00000400 (10)
ONUSERLOGOFF. Announce the advertisement to the user on logoff.
0x00008000 (15)
WINDOWS_CE. The advertisement is for a device client.
0x00020000 (17)
DONOT_FALLBACK. Do not fall back to unprotected distribution points.
0x00040000 (18)
ENABLE_TS_FROM_CD_AND_PXE. The task sequence is available to removable media and the pre-boot execution environment (PXE) service point.
0x00100000 (20)
OVERRIDE_SERVICE_WINDOWS. Override maintenance windows in announcing the advertisement to the user.
0x00200000 (21)
REBOOT_OUTSIDE_OF_SERVICE_WINDOWS. Reboot outside of maintenance windows.
0x00400000 (22)
WAKE_ON_LAN_ENABLED. Announce the advertisement to the user with Wake On LAN enabled.
0x00800000 (23)
SHOW_PROGRESS. Announce the advertisement to the user showing task sequence progress.
0x02000000 (25)
NO_DISPLAY. The user should not run programs independently of the assignment.
0x04000000 (26)
ONSLOWNET. Assignments are mandatory over a slow network connection.
- AdvertisementID
- Data type: StringAccess type: Read/WriteQualifiers: [key, ResID(801), ResDLL("SMS_RSTT.dll")]Unique auto-generated key that identifies the advertisement. The default value is "".
- AdvertisementName
- Data type: StringAccess type: Read/WriteQualifiers: [Not_null]Unique user-friendly name for the advertisement.
- AssignedSchedule
- Data type: SMS_ScheduleToken ArrayAccess type: Read/WriteQualifiers: [max(15), lazy]SMS_ScheduleToken Server WMI Class objects indicating the time when the advertisement becomes mandatory on the clients.
- AssignedScheduleEnabled
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true if the schedule defined in the AssignedSchedule property is active. The default value is false.
- AssignedScheduleIsGMT
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true if the schedule defined in the AssignedSchedule property is in Universal Metric Time (UMT). The default value is false.
- AssignmentID
- Data type: UInt32Access type: Read-onlyQualifiers: [read]ID of the assignment associated with the advertisement.
- CollectionID
- Data type: StringAccess type: Read/WriteQualifiers: [Not_null]Existing collection to which the advertisement is targeted.
- Comment
- Data type: StringAccess type: Read/WriteQualifiers: NoneSimple description or note about the advertisement. The default value is "".
- DeviceFlags
- Data type: UInt32Access type: Read/WriteQualifiers:
NoneFlags describing the device. Possible values are listed below.
The default value is 0.
Hexadecimal (Bit) Description 0x01000000 (24)
Always assign program to the client.
0x02000000 (25)
Assign only if the device is currently connected to a high-bandwidth connection (default above 60 KBps).
0x04000000 (26)
Assign only if the device is docked, that is, it is attached to a desktop that is using ActiveSync.
- ExpirationTime
- Data type: DateTimeAccess type: Read/WriteQualifiers: NoneDate and time when the advertisement is no longer available to clients. The default value is 19900101000000.000000+****.
- ExpirationTimeEnabled
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true if the advertisement expires at the time indicated by the ExpirationTime property. The default value is false.
- ExpirationTimeIsGMT
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true if the time defined in the ExpirationTime property is in UMT. The default value is false.
- HierarchyPath
- Data type: StringAccess type: Read/WriteQualifiers: NoneReserved.
- IncludeSubCollection
- Data type: BooleanAccess type: Read/WriteQualifiers: Nonetrue (default) if the advertisement is advertised to the subcollections of the specified collection.
- ISVData
- Data type: Uint8 ArrayAccess type: Read/WriteQualifiers: [large, lazy]Information that allows a single ISV to store data relating to an SMS_Program instance. There are no restrictions or defined formats for this data. However, it is important to not overwrite the property after its ISV ownership has been established. Therefore, the calling application should read the existing data in this property first. If the data does not belong to the application, it should not be modified. Any ISV or application owner who is using this property should include an identifier in the data so that ownership can be easily established.
- ISVDataSize
- Data type: UInt32Access type: Read/WriteQualifiers: [lazy]The size of the data represented by the ISVData property. The default value is 0.
- MandatoryCountdown
- Data type: UInt32Access type: Read/WriteQualifiers: NoneDuration, in minutes, to show operating system deployment user notification mandatory schedule countdown. The default value is 0.
- OfferType
- Data type: UInt32Access type: Read/Write Qualifiers:
[enumeration]Advertisement type that indicates that the
advertisement is targeted to users.
Value Description 0
Required
2
Available
- PackageID
- Data type: StringAccess type: Read/WriteQualifiers: [Not_null]ID for an existing package associated with the advertisement. The value must be in uppercase.
- PresentTime
- Data type: DateTimeAccess type: Read/WriteQualifiers: NoneDate and time when the advertisement is made available to clients. The default value is 19900101000000.000000+****.
- PresentTimeEnabled
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true (default) if the present time is enforced by Configuration Manager.
- PresentTimeIsGMT
- Data type: BooleanAccess type: Read/WriteQualifiers: [lazy]true if the time defined in the PresentTime property is in UMT. The default value is false.
- Priority
- Data type: UInt32Access type: Read/WriteQualifiers:
[enumeration]The priority used in replicating the advertisement to
child sites. Possible values are listed below. The default value is
NORMAL (2).
Value Description 1
HIGH
2
NORMAL
3
LOW
- ProgramName
- Data type: StringAccess type: Read/WriteQualifiers: [Not_null]A program within the specified package (PackageID) to be advertised.
- RemoteClientFlags
- Data type: UInt32Access type: Read/WriteQualifiers:
[bits]Flags specifying how the program should run when the client
is connected either locally or remotely to a distribution point.
Possible values are listed below. The default value is 48.
Hexadecimal (Bit) Description 0x00000001 (0)
BATTERY_POWER. Run the program by using battery power. This value is currently unused.
0x00000002 (1)
RUN_FROM_CD. Run the program from CD. This value is currently unused.
0x00000004 (2)
DOWNLOAD_FROM_CD. Download the program from CD. This value is currently unused.
0x00000008 (3)
RUN_FROM_LOCAL_DISPPOINT. Run the program from the local distribution point.
0x00000010 (4)
DOWNLOAD_FROM_LOCAL_DISPPOINT. Download the program from the local distribution point.
0x00000020 (5)
DONT_RUN_NO_LOCAL_DISPPOINT. Do not run the program if there is no local distribution point.
0x00000040 (6)
DOWNLOAD_FROM_REMOTE_DISPPOINT. Download the program from the remote distribution point.
0x00000080 (7)
RUN_FROM_REMOTE_DISPPOINT. Run the program from the remote distribution point.
0x00000100 (8)
DOWNLOAD_ON_DEMAND_FROM_LOCAL_DP. Download the program on demand from the local distribution point. This is only applicable for task sequences.
0x00000200 (9)
DOWNLOAD_ON_DEMAND_FROM_REMOTE_DP. Download the program on demand from the remote distribution point. This is only applicable for task sequences.
0x00000400 (10)
BALLOON_REMINDERS_REQUIRED. Balloon reminders are required.
0x00000800 (11)
RERUN_ALWAYS. Always rerun the program.
0x00001000 (12)
RERUN_NEVER. Never rerun the program.
0x00002000 (13)
RERUN_IF_FAILED. Rerun the program if execution previously failed.
0x00004000 (14)
RERUN_IF_SUCCEEDED. Rerun the program if execution previously succeeded.
0x00008000 (15)
PERSIST_ON_WRITE_FILTER_DEVICES
This information applies only to System Center Configuration Manager SP1.
0x00010000 (16)
ENABLE_PEER_CACHING
This information applies only to System Center Configuration Manager SP1.
0x00020000 (17)
DON’T_FALLBACK
This information applies only to System Center Configuration Manager SP1.
0x00040000 (18)
DP_ALLOW_METERED_NETWORK
This information applies only to System Center Configuration Manager SP1.
- SourceSite
- Data type: StringAccess type: Read-onlyQualifiers: [read]Three-letter site code of the site where the advertisement originates.
- TimeFlags
- Data type: UInt32Access type: Read-onlyQualifiers:
[read, bits]Reserved for internal use. Flags that duplicate the
information in the time-related properties. Possible values are
listed below. For example, ENABLE_PRESENT is set when
PresentTimeEnabled equals true.
Hexadecimal (Bit) Description 0x00000001 (0)
ENABLE_PRESENT
0x00000002 (1)
ENABLE_EXPIRATION
0x00000004 (2)
ENABLE_AVAILABLE
0x00000008 (3)
ENABLE_UNAVAILABLE
0x00000010 (4)
ENABLE_MANDATORY
0x00000020 (5)
GMT_PRESENT
0x00000040 (6)
GMT_EXPIRATION
0x00000080 (7)
GMT_AVAILABLE
0x00000100 (8)
GMT_UNAVAILABLE
0x00000200 (9)
GMT_MANDATORY
Remarks
Class qualifiers for this class include:
- Secured
For more information about both the class qualifiers and the property qualifiers included in the Properties section, see Configuration Manager Class and Property Qualifiers.
Although there are no other key properties, the properties AdvertisementName, CollectionID, PackageID, and ProgramName are qualified as NOT_NULL, and values must be supplied. Your application cannot update these properties after a class instance is created. To change these values, the application must delete the instance and create a new instance with the correct values.
Requirements
Runtime Requirements
For more information, see Configuration Manager Server Runtime Requirements.
Development Requirements
For more information, see Configuration Manager Server Development Requirements.