You are not logged in.
Hi.
I'm running the following command In a Java app.
cmd /k type zerozero.ps1 | powershell.exe -noprofile -
the file runs and Is piped to powershell as expected but the cmd windows does not appear to show details I want the user to see.
I've tried running :
cmd /C start cmd /k type zerozero.ps1 | powershell.exe -noprofile -
the cmd window opens using this command but only the type command runs and displays the output.
Piping to PowerShell doesn't work when I use "start"
Is there some Issue with using start I am unaware of ?
Would appreciate any assistance.
Thanks In advance.
Offline
Why are you piping to powershell? Seems like an odd way to go about things.
How about this?
cmd /c start "" cmd /k powershell.exe -noprofile zerozero.ps1
cmd | *sh | ruby | chef
Offline
Hi.
I want to run the app on any pc without needing to change access rights for running powershell scripts. I pipe the command to bypass this.
Offline
If the method you provided works without needing to make any access changes to powershell , I'll use that. Don't have time to check at the moment.
Offline