Double Quotes in Script Parameter

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Double Quotes in Script Parameter

Post by oryagel »

Hi,

I'm trying to pass a parameter that includes quotes to a powershell script.
So basically the params line looks something like that:

Code: Select all

10 20 '(abc),"7d",(def)'
I need the third parameter to be

Code: Select all

(abc),"7d",(def)
but it seems like it's turned to

Code: Select all

(abc),7d,(def)
without the double quotes.

What should I do?

Thanks
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You need to use backslash( \ ) symbol before each double quote:

Code: Select all

10 20 '(abc),\"7d\",(def)'
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Great! Thanks!
I should have tried it myself.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome!
Post Reply