I have an Application Profile, that runs a script:
executable = cmd.exe
parameters = /c %windir%\system32\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -file script.ps1 @param@
I'm changing the @Param@ ServiceSetting value at the point of creating a Service, however, i get an error at the point where the VM Guest is executing the script: Error 22632 - which is complaining about the param function in my script which i have in place to capture the param input from the parameter line in the Application Profile (as above).
Essentially, what i'm trying to do is execute a powershell script via the Application Profile and pass in a variable - any advice is appreciated? Thanks!