Hello, I am trying to utilize the Host Integrity-Utility Run a Script function, but cannot figure out the exact syntax for the "Execute the command" section, to get the script/code to actually run. I am using a PowerShell script and have chosen the file and that populates the "Script content" section, which seems correct so far. I do see the reference to use %F% to specify the script file name and have tried many versions of syntax to do that, but it never results in the code actually running.
This is PowerShell and I do first need to do the -executionpolicy bypass command, and then just want to call up the script that is already defined in the File Name and Script Content sections. So I have (for example) tried these commands:
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo %F% "scriptname.ps1"
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo -file %F "scriptname.ps1"
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo %F "scriptname.ps1"
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo -file "scriptname.ps1"
It seems like I just cannot get quite the right syntax for that command, so I am checking if anyone possibly/likely smarter or more experienced than me could give me any recommendations or pointers. Thanks in advance!