Cmdlets for ServiceNow

Build 24.0.9060

Remove-ServiceNow Cmdlet

Parameters   Output Objects  

Deletes ServiceNow data.

Syntax

Remove-ServiceNow [parameters]

Remarks

The Remove-ServiceNow cmdlet allows you to use a syntax similar to SQL DELETE statements to delete ServiceNow data.

$conn = Connect-ServiceNow -OAuthClientId "MyClientId" -OAuthClientSecret "MyClientSecret" -Password "MyPassword" -User "MyUser" -Url "https://MyInstance12345.service-now.com/"
Remove-ServiceNow -Connection $conn -Table "incident" -Id "S"
The Where parameter can also be used to specify the primary key:
Remove-ServiceNow -Connection $conn -Table "exTablePowershell;" -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'" | Remove-ServiceNow

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