I am trying to build a GUI frontend for an existing script.
The GUI presents various buttons/input fields to build the appropriate named parameters to send to the script.
What I cannot figure out how to do, is invoke the script from Add-JobTracker -JobScript {
THIS WORKS GREAT:
Add-JobTracker -Name "$JobName" -JobScript {
& "C:ScriptsSomeScript.ps1" -GUI -Source:Server01a -Scope:SharesOnly -Created }
However, I have arguments in variables.. Running in the console I can do this:
& $scriptName $scriptArguments
Where $scriptname = "C:ScriptsSomeScript.ps1"
and $scriptArguments = " -GUI -Source:Server01a" -Scope:SharesOnly"
How can I invoke a & $scriptName $scriptArguments
with Add-JobTracker?
Looking for some help with Add-JobTracker
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- ryan.simpson
- Posts: 2
- Last visit: Wed Aug 10, 2016 7:14 am