Jump to content


  • 0
Corbendallas

update package by not one but TWO schedules - possible or not?

Question

Hello experts :)

So, I have a package which needs to be automatically updated the first of every month.

No big deal, just set the schedule and your done.

 

Now, the customer has got the bright idea that they want to schedule an update every sunday as well.

Is that even possible?

 

As far as I can see, you can't do it in the ordenary scheduler of the package so some out of the box thinking is probably needed.

Ideas?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Quite easy to do using Windows PowerShell and the WMI provider for SCCM:

 

# Populate these variables

$SccmServer = 'MySccmServer'

$SccmSiteCode = 'LAB'

$PackageID = 'LAB00023'

$MyPkg = Get-WmiObject -ComputerName $SccmServer -Namespace root\sms\site_$SccmSiteCode -Class SMS_Package -Filter "PackageID = '$PackageID'"

$MyPkg.RefreshPkgSource()

Now, schedule this to execute in the Windows task scheduler, using an account that has access to the SCCM Provider.

 

Cheers,

Trevor Sullivan

http://trevorsullivan.net

http://twitter.com/pcgeek86

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.