SMS_Advertisement Server WMI Class

Hi,

When I create a advertisement from a legacy package-program using the String AdvertisementName doesn't make sense since the name is not given to the advertisement.

I checked in the advertsement properties in GUI and can't find the name anywhere. If I ignore the AdvertisementName property, it gives error. so should we anyway use this property and give some name eventhough it's not applied to the advertisement?

thanks,
peer

December 20th, 2013 2:04am

Hi Peer,

the AdvertisementName is the name of the Deployment 'Package' you create for a package. It is the name that shows up in the GUI / Console as the Deployment name.

I have used the settings below (also for 'legacy' Packages / Programs) and it works fine:

$newAdv.AdvertisementName = $item.ProgramName + "_" + $packageID.PackageID + "_" + $item.CollectionName
$newAdv.CollectionID      = $collID.CollectionID
$newAdv.PackageID         = $packageID.PackageID
$newAdv.ProgramName       = $item.ProgramName
$newAdv.RemoteClientFlags = "2096"
$newAdv.PresentTime       = $curDate
$newAdv.SourceSite        = $sitecode
$newAdv.TimeFlags         = "8193"
$advPath                  = $newAdv.Put()

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2015 9:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics