Powershell with parameters

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
jarlrmai
Posts: 10
Joined: Mon May 16, 2011 4:13 am

Powershell with parameters

Post by jarlrmai »

I have a powershell script which sends a message it takes 2 parameters thus

pushover.ps1 -title "A Title" -message "Message for user"

I want to use this as an action in KSHM

So I setup command line

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" c:\scripts\pushover.ps1 -title "%TestName%" -message "%SimpleStatus%"

I only get the 1st word from the Macro if it is multiword

How do I use multi word macros for my parameters?

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

Post by KS-Soft Europe »

Just use single quotes instead of double quotes for powershell parameters.
jarlrmai
Posts: 10
Joined: Mon May 16, 2011 4:13 am

Post by jarlrmai »

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

Post by KS-Soft Europe »

You are welcome.
Post Reply