Batch file to Powershell

Hi,

Is it possible to take the following code and use a PowerShell script instead?

cmd /c “start C:\papercut-hive.exe /VERYSILENT /systemkey=“zOdwnks2MameEvivgznEEEDf0VMOKH4RArjgqcYAOuBjAKzDjaGJtC4uuzViM2ro6pNEFTxWvoot6haiHa3v7pAXgj” --silent”

cmd /c “start C:\papercut-hive.exe /VERYSILENT /CURRENTUSER /userkey=“zOdwnks2MameEvivgznEEEDAKzDjaGJtC4uuzViM2rolwpyg46pNEFTxWvoot6haiHa3v7pAXgj” --silent”

Any help would be very much appreciated.

Dan,
Welcome to the forum. :wave:t4:

Since both commands actually just call external apps - why would you want to change it to PowerShell? And because PowerShell is - just like CMD - a Command Line Interface … of course you can run external apps in PowerShell.

So - to answer your question:

Yes. :man_shrugging:t4: :wink:

Regardless of that - When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

Dan,

Check out help for the Start-Process cmdlet. That should give you what you need.

Darwin