Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

New Post: new-scsmincident get id of this new incident?

$
0
0
Hello,

i have a powershell script where this feature has been used :)

To create the new incident use this line (you can remove fields you dont need)

$incidentid = (New-SCSMIncident -title $global:title -Description $global:description -Impact $global:impact -Urgency $global:urgency -Classification $global:classification -Status $global:Status -SupportGroup $global:TierQueue -Source "Phone" -Passthru).Object

Your ticket id is inside $incidentid
Now you can use this to get informations from the new incident:
$i = Get-SCSMObject (Get-SCSMClass System.WorkItem.Incident$) -Filter "Id -eq $ID"

If you need more informations tell me
InT-2k

Viewing all articles
Browse latest Browse all 306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>