Hi,
I use Powershell to automate an application called ServiceNow. To access ServiceNow with PowerShell I have
import a module called PSServiceNow. Now I have all the functions of Servicenow to my displossal.
In the help-section I have even a great example “how to create a new ticket in ServiceNow”. But when i run
the code I get an error saying that i must authenticate first. It even gives me 3 steps to do this:
Exception: You must do one of the following to authenticate:
- Call the Set-ServiceNowAuth cmdlet
- Pass in an Azure Automation connection object
- Pass in an endpoint and credential
But I don’t understand what it means. Does perhaps someone know what I have to do to make my code work:
Import-Module PSServiceNow New-ServiceNowIncident -ShortDescription "XXXXX" -Description "" -AssignmentGroup "" -Category "Internal" -SubCategory "Task" -Comment "Comment" -ConfigurationItem "XXXXX" -Caller "XXXXX"
Thank you in advanced,
Greetings, Peter Kiers