14 through 17 – Loads some variables with the all important Instance url & Endpoint which is the incident table url.10 through 12 – Converts the username & password to a Base64 string and adds Authorization set to Basic in the headers.Set's content-type & accept to "application/json" 5 through 8 – Creates a dictionary used for the POST headers.1 through 3 – Sets the Username & Password of the elevated user that has rights to log a ticket using basic authentication.This is lines 1 through 21 in the code snippet above. I will provide a quick summary of the code that sits out with the function, Add-Ticket. = $ShortDescriptionīody you have had a flick through the pre-requisites or are already familiar with these. Here is the code that I am going to demonstrate and I will step through it line by line as we go through the post. PowerShell Script To Create ServiceNow Incident Use PowerShell With ServiceNow API – How To Authenticate and Return Ticket Data.ServiceNow – Create and Elevate Your First Admin User. You may want to explore the following blogs that will help set the scene with what I am going to demonstrate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |