You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate a basic Incident attributed to the caller "UserName" with descriptions, categories, assignment groups and CMDB items set.
14
+
New-ServiceNowIncident -Caller "UserName" -ShortDescription = "New PS Incident" -Description = "This incident was created from Powershell" -AssignmentGroup "ServiceDesk" -Comment "Inline Comment" -Category "Office" -Subcategory "Outlook" -ConfigurationItem UserPC1
15
+
16
+
.EXAMPLE
17
+
Generate an Incident by "Splatting" all fields used in the 1st example plus some additional custom ServiceNow fields (These must exist in your ServiceNow Instance):
18
+
19
+
$IncidentParams = @{Caller = "UserName"
20
+
ShortDescription = "New PS Incident"
21
+
Description = "This incident was created from Powershell"
22
+
AssignmentGroup "ServiceDesk"
23
+
Comment "Inline Comment"
24
+
Category "Office"
25
+
Subcategory "Outlook"
26
+
ConfigurationItem UserPC1
27
+
CustomFields = @{u_custom1 = "Custom Field Entry"
28
+
u_another_custom = "Related Test"}
29
+
}
30
+
New-ServiceNowIncident @Params
31
+
32
+
#>
33
+
2
34
Param(
3
35
4
36
# sys_id of the caller of the incident (user Get-ServiceNowUser to retrieve this)
0 commit comments