Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

How to I execute a command string which has too many escape characters and such

$
0
0

Hi,

I know this is not a PowerShell forum, but perhaps it will eventually help someone else!

I need to execute the following command, all one one line:

 

 

curl -vvvv -XPUT --negotiate -u : --insecure -XPUT -g -H '"Content-Type: application/json"' -d "{\"hosttype\":\"server\", \"address\": [\"127.

0.0.1\"], \"parents\": [], \"tag\": [\"demo\"], \"umiworker\": \"gent\", \"notes\": \"this is a test\", \"url\": \"http://www.tomtom.com\"}" https://someservert/v1/host/test

 

However, no matter how many times I set a variable to this, it still fails.

 

Can anyone help me wrap this thing up and execute it in PS?

 

Thanks!


Viewing all articles
Browse latest Browse all 175326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>