Yesterday, I am having trouble passing parameters using a custom powershell plugin from a Windows machine running the NCPA 3.0.0.client.
To help with testing, I wrote the following PS script:
Code: Select all
param (
[string]$F='John',
[string]$L='Doe',
[string]$M='E'
)
write-host "Success! $($F) $($M) modified $($L)."
Exit 0To test, I am modifying the nrdp.cfg on the Windows machine, restarting the service and then going to http://localhost:5693/gui/checks.download lagu
I have tried lots of combinations with varying results. For example:
Code: Select all
%HOSTNAME%|TestArgs = plugins/testargs.ps1 --args Joe Donuts S"Here are some of my notes, sorry they are a little disorganized. Keep in mind F used to be First, M - Middle, L - Last
-a did not work
--args 'G K B' not working at all
--args 'G,K,B' treats as first argument only
--args '-First G' not working
--args '--First G' not working
--args "-First G" not working
--args "-First 'G'"
--args -First G - specify a system string
--args -First "G" - Same
--args -First 'G' - Same
--args 'G','k' recognized first two params, but included quotes
--args Gar,k combined into 1 parameter.
--args "Gar ak","k" not working at all - Same with single quotes - doesn't seem to like spaces.
Gar,F,Eild - combined
"Gar","F","Eild" - correclty set first to "Gar" but combimed "F","Eild" together for last
"Gar,F,Eild" - combined into first