Skip to content

Commit b7179ba

Browse files
authored
Adding Example for New-ServiceNowIncident
Adding Example for New-ServiceNowIncident because it took me far longer to workout how to do this than I would like to admit. I'm sure others will run in to the same at some point.
1 parent 9089f21 commit b7179ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ $Incident = Get-ServiceNowIncident -Limit 1 -MatchContains @{short_description='
6868
Update-ServiceNowIncident -SysID $Incident.Sys_ID -Values @{comments='Updated via PowerShell'}
6969
```
7070

71+
### Example - Creating a Incident with custom table entries
72+
73+
```PowerShell
74+
$IncidentParams = @{Caller = "UserName"
75+
ShortDescription = "New PS Incident"
76+
Description = "This incident was created from Powershell"
77+
CustomFields = @{u_service = "MyService"
78+
u_incident_type = "Request"}
79+
}
80+
New-ServiceNowIncident @Params
81+
```
82+
7183
### Azure Connection Object (Automation Integration Module Support)
7284

7385
The module can use the `Connection` parameter in conjunction with the included `ServiceNow-Automation.json` file for use as an Azure automation integration module. Details of the process is available at [Authoring Integration Modules for Azure Automation](https://azure.microsoft.com/en-us/blog/authoring-integration-modules-for-azure-automation).

0 commit comments

Comments
 (0)