Update-ServiceNow Cmdlet
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")