Running Exchange Powershell Scripts

How do I go about running an Exchange Powershell script from PDQ Deploy?

I attempted to use the following command in PDQ Deploy with no luck:

powershell.exe -psconsolefile "C:\Program Files\Microsoft\Exchange Server\V14\Bin\exshell.psc1" -file "script.ps1"

The job in PDQ Deploy finishes successfully, however it does not actually do anything.

 

 

0

Comments

1 comment
Date Votes
  • Hi Len,

    If you have deployed the command as above, I believe it is going to try and run C:\Program Files\Microsoft\Exchange Server\V14\Bin\exshell.psc1" -file "script.ps1 on every machine that the command is deployed to, which means every machine would need the "C:\Program Files\Microsoft\Exchange Server\V14\Bin\" directory and associated files.

    If the above is correct, and those files exist on all targets, then you might want to run this as an install step rather than a command step. For additional information on how to do that, please see the following (very short) video:

    How to Run .reg, .bat, .vbs and .ps1 Files in PDQ Deploy

    If those targets do not have the files listed in the command, you could place the script on \\server\share and ensure that permissions for that share allow the user in PDQ Deploy -> Preferences -> Credentials access to the share then deploy using the UNC path to the script.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post