chocolatey / ChocoCCM

PowerShell module for interacting with Chocolatey Central Management
Apache License 2.0
9 stars 8 forks source link

Removing Stale Endpoints from CCM #48

Closed adilio closed 2 years ago

adilio commented 3 years ago

Customers have asked for a programmatic way to deprecate/remove endpoints that have not checked in for a certain period of time.

Some of the logic in Get-CCMComputer could accomplish a part of this, being able to evaluate the property of when the endpoint last checked into CCM.

If there was a way to define a max check-in time interval after which to remove the endpoint from CCM, that's what this Remove-CCMComputer or Remove-CCMStaleComputer would act on. You could set a -MaxLastCheckinDays value as a parameter.

steviecoaster commented 3 years ago

This could be useful, but requires an additional permission, that isn't enabled by default even on the ccmadmin account.

So this feature would require the following:

Foxavoavo commented 2 years ago

Hello, will be great to have Remove-CCMComputer

or even a script that does this computer housekeep once per month.

I have an array to compare computers with AD but then I need to go an remove computers from Chocolatey Central Management manually.

ryanrichter94 commented 2 years ago

Closing this issue as Stale Computer Deletion was added into the settings of CCM itself as a feature the 0.10.0 release of CCM. Please reference the CCM Usage Docs for a full breakdown of the feature and how to enable and configure it.