Closed adilio closed 2 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:
Set-CCMPermission
Remove-CCMComputer
cmdletGet-CCMComputer
called -MaxLastCheckInDays
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.
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.
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
orRemove-CCMStaleComputer
would act on. You could set a-MaxLastCheckinDays
value as a parameter.