Quantcast
Channel: Print/Fax forum
Viewing all articles
Browse latest Browse all 3156

How can I get the value of a parameter passed to a script with Print Management notifications of a custom filter

$
0
0

I understand variables can be used that can be passed to a script in the notifications window of a custom filter.

I created a small command shell script to echo any variables that were passed:

@Echo Variable 1 is %1

@Echo Variable 2 is %2

@Echo Variable 3 is %3

@Echo Variable 4 is %4

@Echo Variable 5 is %5

@Echo Variable 6 is %6

etc..

Without any parameters in the parameters field, I clicked Test and saw the following:

Variable 1 is 'PrintServer'

Variable 2 is 'ServerName'

Variable 3 is 'Title

Variable 4 is of

Variable 5 is custom

Variable 6 is filter'

What I didn't see is the values of 'PrintServer' and 'ServerName'

How can I extract the value of 'PrintServer' & 'ServerName' to pass into a powershell script via the $args variable.

I know I can use $args.foreach or some other loop to output to console or file - I just can't figure out how to transpose 'PrintServer' & 'ServerName'into its value.

I've tried to find results from Bing, but 'How to use notification variables in print management' bring vague results back and keeps pointing me to the guide (but unfortunately the guide doesn't provide a lot of info for passing variables to scripts).

Please help.


Viewing all articles
Browse latest Browse all 3156

Trending Articles