Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Use Powershell to create automatic ticket in ServiceNow

peterkiers
Kilo Contributor

Hi,

I would like to use PowerShell to create automaticly an ticket in ServiceNow. I have read that i need a ServiceNow-module

in order to access ServiceNow from Powershell.

Where can i get a ServiceNow-module?

Greetings,

Peter Kiers

1 ACCEPTED SOLUTION

Yes, what I pointed you out was the REST API which provides a way to access from externally the ServiceNow instance and do operations:



Getting started with the REST API


REST API



With REST API you can create/delete/query tables in ServiceNow. The REST API Explorer is there to help you understand how to it works, and still our docs show all available methods for a table for example:



Table API


View solution in original post

4 REPLIES 4

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

HI Peter,



I think you're referring to REST API Explorer:



System Web Services -> REST -> REST API Explorer



There you have at the bottom a Powershell example as well:



Screen Shot 2017-03-30 at 10.58.25 AM.png


No, what i would like is to create a powershell script and after execute it it will create a new ticket in ServiceNow.


But how can you access the ServiceNow functions with Powershell ? I have learned that you need a servicenow


module which has all the functions of servicenow. But where can i get that module? Greetings, Peter Kiers


Yes, what I pointed you out was the REST API which provides a way to access from externally the ServiceNow instance and do operations:



Getting started with the REST API


REST API



With REST API you can create/delete/query tables in ServiceNow. The REST API Explorer is there to help you understand how to it works, and still our docs show all available methods for a table for example:



Table API


Thanks for the help.



Greetings, Peter Kiers