Start Powershell in CMD and add verbs

I want to known if is it possible to sent 2 verbs with staring up a powrshell sciprt in CMD.

I want to sent in this case $verb1=$true $verb2=$true.

Is this possible?

thanks in advance.

Could you please elaborate a little more detailed? You may share the relevant part of your code to make clear what it’s about.

i have already tried a couple of things it must be a ps1 file that must startup from cmd and i need that it send 2 true verbs from cmd at the startup of the script file. this is what I tried sofar:

Powershell.exe -executionpolicy Bypass -File “0Parts\Games better performance.ps1” -Command {Invoke-Command -ScriptBlock {$GTA5=$true,$epic=$true}
Powershell.exe -executionpolicy Bypass -File “0Parts\Games better performance.ps1” -Command -GTA5 $true -epic $true
Powershell.exe -NoProfile -Command ."0Parts\Games better performance.ps1" -GTA5 -epic

Powershell.exe -executionpolicy Bypass -File “0Parts\Games better performance.ps1” -Command “& {$GTA5=$true, $epic=$true}”
Powershell.exe -executionpolicy Bypass -File “0Parts\Games better performance.ps1” -Command “& {$GTA5=$true, $epic=$true}”
powershell.exe -Command Start-Process PowerShell -ArgumentList ‘-NoProfile -File "0Parts\Games better performance.ps1" "$GTA5=$true" "$epic=$true"’ -Verb RunAs

PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File “””“0Parts\Games better performance.ps1"”“” -GTA5 “”“”$true"“”" -epic “”“”$true"“”" ’ -Verb RunAs}";

Well … that looks weird. :wink: Do you try to pass arguments to your script? If that’s the case and your parameters are named $GTA5 and $epic you could run it like this:

PowerShell.exe -File "0Parts\Games better performance.ps1" -GTA5 true -Epic true

Please notice you can only pass strings from the command line - not PowerShell variables. :wink:

I thought i can use verbs form cmd to powershell but now I have changed the code so I use the arguments in the if statement.

$param1=$args[0]
$param2=$args[1]
if (“GTA5” -eq $args[0])
if (“epic” -eq $args[1])

Thanks for your help