Sign in to follow this  
Followers 0
lostangel556

Opening Exchange 2007 Powershell

3 posts in this topic

Hi everyone,

wandering if anyone has been able to figure out this problem. Im trying to open the exchange 2007 powershell from an autoit v3 window (via run or shellexecute) but keep getting the error message:

CODE
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:\Program Files\Microsoft\Exchange Server\bin\ExchangeTemp.ps1'" co

uld not be executed because some Windows PowerShell snap-ins did not load.

C:\Program Files\Microsoft\Exchange Server\bin>

Now, the shortcut on my desktop has the below in it and this works when put into the run box

CODE
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\bin\Exchange.ps1'"

I've google'd the top error message and found that it isn't loading the exchange snap ins.

I've even tried to run the .lnk file on the desktop and am still getting the above error.

Share this post


Link to post
Share on other sites



Found an way around it. Just going to use Send() to open the run dialog and open it that way

Hi everyone,

wandering if anyone has been able to figure out this problem. Im trying to open the exchange 2007 powershell from an autoit v3 window (via run or shellexecute) but keep getting the error message:

CODE
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:\Program Files\Microsoft\Exchange Server\bin\ExchangeTemp.ps1'" co

uld not be executed because some Windows PowerShell snap-ins did not load.

C:\Program Files\Microsoft\Exchange Server\bin>

Now, the shortcut on my desktop has the below in it and this works when put into the run box

CODE
C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1" -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\bin\Exchange.ps1'"

I've google'd the top error message and found that it isn't loading the exchange snap ins.

I've even tried to run the .lnk file on the desktop and am still getting the above error.

Share this post


Link to post
Share on other sites

compile ur script as 64bit and it should work, i have had this error aswell, after i made the exe 64bit it worked.

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  
Followers 0