Home Service Manager

Tier queue change for multiple tickets script

James_AtanceJames_Atance Cireson Support Advanced IT Monkey ✭✭✭
I have had to change the TierQueue for over 60 tickets recently (which would have been a painful task to do manually) Here is a script to change it on mass using a text file

Import-Module SMLets
# Class declaration for Incidents
$Class = Get-SCSMClass –Name System.WorkItem.Incident$
$TList = Get-Content 'C:\temp\test\ir.txt'
foreach ($T in $TList)
{
Get-SCSMObject -Class $Class -filter "Id -eq $T" |
Set-SCSMObject -Property TierQueue -Value "2nd Line"
}
Sign In or Register to comment.