Here's a script I wrote to space out full updates and uncheck incremental updates:
http://www.ephingadmin.com/spacing-out-scheduled-full-updates-in-collections/ On Tue, Dec 6, 2016 at 5:14 PM Atkinson, Matt T < [email protected]> wrote: > Q: Will that do every collection we created? > > > > A: Yes, as written it would change every collection. Modify this part: > $collections = Get-CMCollection to do only certain collections. > > > > Q: Does it 'uncheck' the Incremental option? > > > > A: Not as written, to also remove incremental checkbox you could modify > the set-cmcollection part to include the “–refreshtype periodic” parameter. > > > > Q: Also, is there a way within it to set the actual time to do the 'Full > Update' during that 7th day? > > > > A: I ran in to some errors trying to get this nailed in the way I think it > should work due to data types not converting, but this does seem to work > for me, just adjust the time to be what you need: > > > > $collections = Get-CMCollection > > > > foreach ($collection in $collections) > > { > > Set-CMDeviceCollection -CollectionId $collection.Collectionid > -RefreshSchedule (New-CMSchedule -Start "12/06/16 7:30 PM" -RecurInterval > Days -RecurCount 7) -RefreshType > Periodic > > } > > > > > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Adam Juelich > *Sent:* Tuesday, December 06, 2016 12:27 PM > *To:* [email protected] > *Subject:* Re: [mssms] Collection Update Query > > > > Matt, > > > > Will that do every collection we created? Does it 'uncheck' the > Incremental option? Also, is there a way within it to set the actual time > to do the 'Full Update' during that 7th day? > > > > Thanks! > > On Tue, Dec 6, 2016 at 1:30 PM, Atkinson, Matt T < > [email protected]> wrote: > > Sorry, just noticed a small typo, here is the correction: > > > > $collections = Get-CMCollection > > > > $schedule = New-CMSchedule -RecurInterval Days -RecurCount 7 > > > > foreach ($collection in $collections) > > { > > Set-CMCollection -CollectionId $collection.collectionid -RefreshSchedule > $schedule > > > } > > > > *From:* Atkinson, Matt T > *Sent:* Tuesday, December 06, 2016 11:24 AM > *To:* [email protected] > *Subject:* RE: [mssms] Collection Update Query > > > > Try this out, will set them to refresh every 7 days, you probably will > need to limit or modify the command used to populate $collections to better > fit your environment: > > > > $collections = Get-CMCollection > > > > $schedule = New-CMSchedule -RecurInterval Days -RecurCount 7 > > > > foreach ($collection in $collections) > > { > > Set-CMCollection -CollectionId $collection.id > <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcollection.id&data=01%7C01%7Cmatt.atkinson%40providence.org%7C1a1fa9ebec7d450aba5b08d41e17357d%7C2e3190869a2646a3865f615bed576786%7C1&sdata=Ziq5KHoqGJwmcICkudQGzJUDezSc3O%2BtjL9c7OHrUjg%3D&reserved=0> > -RefreshSchedule > $schedule > > > } > > > > > > *From:* [email protected] [ > mailto:[email protected] <[email protected]>] *On > Behalf Of *Adam Juelich > *Sent:* Tuesday, December 06, 2016 9:40 AM > *To:* [email protected] > *Subject:* [mssms] Collection Update Query > > > > Hello Everyone, > > > > I just started a new gig and am taking over an existing v1511 site. SQL > is on a separate server which is a problem in itself but I was noticing > that queries were running very slowly even though that server had 28GB of > memory and we are a smaller environment (1600 clients). > > > > I started going through collections and noticed that my predecessor set > just about every Collection to do a Full Update every 15 minutes which is > just crazy. I'm weeding through them but this is getting tedious. > > > > Is there a script out there where I can modify all collections to reset to > something like every 3-7 days at 12AM? I can then go through and modify > the few I would want to have Incremental and/or more aggressive settings. > > > > Thanks! > > > > > ------------------------------ > > > This message is intended for the sole use of the addressee, and may > contain information that is privileged, confidential and exempt from > disclosure under applicable law. If you are not the addressee you are > hereby notified that you may not use, copy, disclose, or distribute to > anyone the message or any information contained in the message. If you have > received this message in error, please immediately advise the sender by > reply email and delete this message. > > > > > ------------------------------ > > This message is intended for the sole use of the addressee, and may > contain information that is privileged, confidential and exempt from > disclosure under applicable law. If you are not the addressee you are > hereby notified that you may not use, copy, disclose, or distribute to > anyone the message or any information contained in the message. If you have > received this message in error, please immediately advise the sender by > reply email and delete this message. >

