I am using PowerShell and want to convert this curl command in PowerShell. It works well in bash
curl -s -H 'X-AUTH-TOKEN:'09f4a92e8fbfc9f9f530771ac32d37a1'' -H "Content-Type: application/json" -X GET 'http://127.0.0.1/centreon/api/beta/monitoring/services?search=\{"service.state":"2","service.is_acknowledged":"0"\}'
Thanks for your help
Additional headers can be added to the
-Headersproperty as hash table entries:You may want to try converting your uri string to type
[System.URI]. This handles standard character replacement like ' ' to%20. I thinkcurldoes this already, but it may help you see if something is invalid: