# Help converting a batch file to Powershell

**URL:** <https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839>\
**Category:** PowerShell Help\
**Created:** [August 21, 2020, 1:55am UTC](https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839 "2020-08-21T01:55:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonlake](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jonlake](https://forums.powershell.org/u/jonlake)\
**Post date:** [August 21, 2020, 1:55am UTC](https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839/1 "2020-08-21T01:55:55Z")

</div>

Hi, I’m a complete newbie to Powershell, so please forgive me if I use incorrect terminology.

I have a simple batch file which runs a data extraction tool called Monarch, and applies a project export file. My employer is moving over to Win10 and locking down people’s ability to run batch files, but we can still run Powershell scripts.

The single action/line I need to replicate in Powershell is:

“C:\Program Files (x86)\Monarch\Program\Monarch.exe” “T:\Finance\Banking\_management\_reporting\data\_capture\_monarch\_project\_export\_files\abi\_dd\_xref\_audit.xprj” /pxall

Thanks in advance for any help you can offer.

Regards

&nbsp;

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 21, 2020, 3:09am UTC](https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839/2 "2020-08-21T03:09:51Z")

</div>

Jon, welcome to [Powershell.org](http://Powershell.org). Please take a moment and read the very first post on top of the list of this forum: [Read Me Before Posting! You’ll be Glad You Did!](https://powershell.org/forums/topic/read-me-before-posting-youll-be-glad-you-did).

When you post code, error messages, sample data or console output format it as code, please.  
In the “ **Text** ” view you can use the code tags “ **CODE** ”, in the “ **Visual** ” view you can use the format template “ **Preformatted** ”. You can go back edit your post and fix the formatting - you don’t have to create a new one.  
Thanks in advance.

> [@](#):
>
> … and locking down people’s ability to run batch files, but we can still run Powershell scripts.

That does not make any sense at all. And I can tell you why. Powershell is - just like CMD - a CLI. You can do the same with Powershell what you can do with CMD … and even more.

And that’s even your solution. You command line should run just like it is in Powershell as well.

---

<div class="post-metadata">

**Author:** ![adminofthings](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@adminofthings](https://forums.powershell.org/u/adminofthings)\
**Post date:** [August 21, 2020, 3:10am UTC](https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839/3 "2020-08-21T03:10:09Z")

</div>

Just put &, the call operator, in front of all that.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/help-converting-a-batch-file-to-powershell/14839/4 "2024-05-16T20:29:01Z")

</div>

Closed on May 16, 2024, 8:29pm UTC


