I would like to schedule every mounth Remove-SCSMObject for remove all Incidents that have priority 6,8,9.
This is possible with the cmdlet bilow:
$irClass = Get-SCSMClass -Name System.WorkItem.Incident$
Get-SCSMObject -Class $irClass | Where {$_.Priority -ne 8 -and $_.Priority -ne 9 -and $_.Priority -ne 6 -and $_.FirstAssignedDate -eq $null} | Remove-SCSMObject -Force
I'm wondering what the impact of schedule deleting this behavior. Anybody out there using Remove-SCSMObject cmdlet in this way right now?
This is possible with the cmdlet bilow:
$irClass = Get-SCSMClass -Name System.WorkItem.Incident$
Get-SCSMObject -Class $irClass | Where {$_.Priority -ne 8 -and $_.Priority -ne 9 -and $_.Priority -ne 6 -and $_.FirstAssignedDate -eq $null} | Remove-SCSMObject -Force
I'm wondering what the impact of schedule deleting this behavior. Anybody out there using Remove-SCSMObject cmdlet in this way right now?