Using PowerShell to Rerun an SCCM Client Advertisement

I wrote the following function to rerun an advertisement on a remote client computer using either the AdvertisementID or the PackageID. Like all sample code found online, please run through a test environment first, and use at your own risk!

FacebooktwitterredditpinterestlinkedinmailFacebooktwitterredditpinterestlinkedinmail

4 Comments

  1. Going to test this today, just curios what happens when I rerun a package that has several programs deployed (an install line and uninstall line) will it run the install then the uninstall afterwoods? or can you specify which program ID to run?

    Reply
    • Great question, Nat! Right now it’d run all of them but what a great idea for an improvement!

      Reply
  2. Great script. How long until the advertisement begins to run? Does App deployment need to run to kick off the updated trigger schedule?

    Reply
    • Hey Justin, thanks! The advertisement will begin immediately if it’ll run from the DP or is already in the cache, otherwise it’ll run after it’s re-cached. Since it’s an advertisement and not a deployment, App Deployment will not need to run. In other words, this is for packages/programs and not applications.

      Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.