powershell script to unix shell script conversion.

Here is a powershell script to use restful API to create ticket in our ticketing tool. Can anyone please convert it to a shell script sothat, I can run it in Unix servers,

below is the code:

$body = @{
    Customer= ''test'
    Summary= 'test summary'
    Impact= '4-Minor/Localized'
    Urgency= '4-Low'
    Service= 'Applications'
    Incident_Type= 'User Service Restoration'
    Reported_Source= 'Direct Input'
    Assignee_Group= 'Stest'
    Product_Name= 'P_name'
    Product_Manufacturer= �test_product
} | ConvertTo-Json
$url = "https://test.com/"
Invoke-RestMethod -Method Post -Uri $url -UseDefaultCredentials -Body $body -ContentType 'application/json; charset=utf-8'

Hello pandeybhavesh18,

A warm welcome in the forums, on your statement.

We do encourage all users to show their efforts in their post what they have put in order to solve their own problems.
So please do so, do add your efforts in your post and let us know. You will get guidance in forums but you have to show efforts.

Thanks,
R. Singh

2 Likes

Please choose a meaningful title for your thread. "Help with shell script" doesn't really convey any info on your request!
I changed it for you, this time.

1 Like