Cmdlets for ServiceNow

Build 24.0.9060

Update-ServiceNow Cmdlet

Parameters   Output Objects  

Updates ServiceNow data.

Syntax

Update-ServiceNow [parameters]

Remarks

The Update-ServiceNow cmdlet allows you to use a syntax similar to SQL UPDATE statements to update ServiceNow data.

$conn = Connect-ServiceNow -OAuthClientId "MyClientId" -OAuthClientSecret "MyClientSecret" -Password "MyPassword" -User "MyUser" -Url "https://MyInstance12345.service-now.com/"
Update-ServiceNow -Connection $conn -Table "incident" -Columns @("priority") -Values @("5") -Id "S"
The Where parameter can also be used to specify the primary key of the table:
Update-ServiceNow -Connection $conn -Table "incident" -Columns @("priority") -Values @("5") -Where "sys_id = 'S'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-ServiceNow -Connection $conn -Table incident -Where "category = 'request'" | Update-ServiceNow -Columns @("category") -Values @("request 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060