0

Is there a way to create a local advertisement on a machine to run a package/program?

Purpose being for testing, or even adhoc deployment. Instead of creating a test advertisement and collection, waiting for the collection refresh etc, a local script could generate a custom advertisement on the machine. Which SCCM would then deploy.

I'm primarily interesting in SCCM 2012, but any information or speculation would be appreciated.

Thanks!

klyd
  • 213
  • 1
  • 3
  • 7

1 Answers1

0

Even if you write a script to install a package via a WMI call, a client can only install an SCCM package that has been advertised to it, and to receive that advertisement it must be a member of a collection to which that package has been advertised.

You can, however, do what you're asking through the use of the Application Catalog by deploying (the new term for advertising) an application to a User collection. Both the Application Catalog and User collections are new features in SCCM 2012.

Software Center (which replaces the Advertised Programs control panel) lists applications that have been deployed to the device (just as the old SCCM 2007 control panel did). The Application Catalog is a web page which lists applications that have been deployed to the user who is accessing the URL.

For testing deployments in SCCM 2012, you can create a user collection with just your own user account in it and then deploy your application to that collection. Then on the client, as long as you are logged in with your own account, you will see that application on the Application Catalog web page. The "advertisement" is immediate. The application will not show in Software Center, and you do not have to wait for the client to check in with the server. You just navigate to the Application Catalog URL in your web browser and hit install.

If you want to do an "ad-hoc" deployment from a script or something, then you can still use WMI for this as long as the script is running in the context of a user account that is a member of a collection to which the application has been deployed. In practice, you could advertise programs to the All Users collection so it'd be available to everyone. Users would have to know how to get to the Application Catalog to ever see it (it's not so obvious to find), but your WMI scripts will always work no matter what user context they're running under. Just bear in mind that the whole point of SCCM is so you don't have to use scripts to do deployments :-)

Wes Sayeed
  • 1,862
  • 6
  • 27
  • 41