Jump to content
Sign in to follow this  

How to run dos command on 64 bit server

Recommended Posts


I am trying to run a Microsoft Exchange server command with PowerShell and if I open Power Shell and run the command manually it runs fine and when I paste the command in a dos batch file it runs great, but when I run the command below it appears to try and open the Power Shell in a 32 bit window based off the error I get. I posted the error below the command.

Any suggestions would be greatly appreciated.



RunWait(@ComSpec & " /c " & 'PowerShell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\Bin\ExShell.Psc1" -Command ". ''c:\test.ps1''"', "", @SW_MAXIMIZE) ;

C:\Exchange Scripts>PowerShell.exe -PSConsoleFile "C:\Program Files\Microsoft\Server\Bin\ExShell.Psc1" -Command ". 'C:\Exchange Scripts\remove_forward.ps1'

WARNING: The following errors occurred when loading console C:\Program Files\Microsoft\Exchange Server\Bin\ExShell.Psc1:

Cannot load Windows PowerShell snap-in

Microsoft.Exchange.Management.PowerShell.Admin because of the following error:

No Windows PowerShell Snap-ins are available for version 1.

Command ". 'C:\Exchange Scripts\remove_forward.ps1'" could not be executed

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.