Skip to content

Commit 848d7bf

Browse files
authored
Merge pull request #117 from alexrgreenwood/patch-1
fix example splat
2 parents ffba5b8 + 987091e commit 848d7bf

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ServiceNow/Public/New-ServiceNowIncident.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ Generate a basic Incident attributed to the caller "UserName" with descriptions,
1010
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
1111
1212
.EXAMPLE
13-
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):
14-
15-
$IncidentParams = @{Caller = "UserName"
16-
ShortDescription = "New PS Incident"
17-
Description = "This incident was created from Powershell"
18-
AssignmentGroup "ServiceDesk"
19-
Comment "Inline Comment"
20-
Category "Office"
21-
Subcategory "Outlook"
22-
ConfigurationItem UserPC1
23-
CustomField = @{u_custom1 = "Custom Field Entry"
24-
u_another_custom = "Related Test"}
25-
}
26-
New-ServiceNowIncident @Params
13+
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):
14+
15+
$IncidentParams = @{Caller = "UserName"
16+
ShortDescription = "New PS Incident"
17+
Description = "This incident was created from Powershell"
18+
AssignmentGroup = "ServiceDesk"
19+
Comment = "Inline Comment"
20+
Category = "Office"
21+
Subcategory = "Outlook"
22+
ConfigurationItem = "UserPC1"
23+
CustomFields = @{u_custom1 = "Custom Field Entry"
24+
u_another_custom = "Related Test"}
25+
}
26+
New-ServiceNowIncident @IncidentParams
2727
2828
#>
2929
function New-ServiceNowIncident {

0 commit comments

Comments
 (0)