![]() |
VOOZH | about |
The CData Cmdlets Module for ServiceNow is a standard PowerShell module offering straightforward integration with ServiceNow. Below, you will find examples of using our ServiceNow Cmdlets with native PowerShell cmdlets.
CData simplifies access and integration of live ServiceNow data. Our customers leverage CData connectivity to:
Many users access live ServiceNow data from preferred analytics tools like Tableau, Power BI, and Excel, and use CData solutions to integrate ServiceNow data with their database or data warehouse.
ServiceNow uses the OAuth 2.0 authentication standard. To authenticate using OAuth, register an OAuth app with ServiceNow to obtain the OAuthClientId and OAuthClientSecret connection properties. In addition to the OAuth values, specify the Instance, Username, and Password connection properties.
See the "Getting Started" chapter in the help documentation for a guide on connecting to ServiceNow.
$conn = Connect-ServiceNow -OAuthClientId "$OAuthClientId" -OAuthClientSecret "$OAuthClientSecret" -Username "$Username" -Password "$Password" -URL "$URL" -InitiateOAuth "$InitiateOAuth"
Follow the steps below to retrieve data from the incident table and pipe the result into to a CSV file:
Select-ServiceNow -Connection $conn -Table incident | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myincidentData.csv -NoTypeInformation
You will notice that we piped the results from Select-ServiceNow into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.
The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.Download a free trial of the ServiceNow Cmdlets to get started:
Download NowLearn more:
👁 ServiceNow IconAn easy-to-use set of PowerShell Cmdlets offering real-time access to ServiceNow data. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.