Hi!
I need to run one powershell command from vbscript. I have no problem
running a command like Get-Command but what I need to run is an Exchange
command (Set-Mailbox). How can I do this?
I tried:
Dim objShell : Set objShell = CreateObject("Wscript.Shell")
objShell.Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit
-PSConsoleFile 'C:\Program Files\Microsoft\Exchange
Server\bin\exshell.psc1' -command '. C:\Program Files\Microsoft\Exchange
Server\bin\Exchange.ps1'")
I get this:
Missing expression after unary operator '-'.
At line:1 char:2
+ -P <<<< SConsoleFile 'C:\Program Files\Microsoft\Exchange
Server\bin\exshell.
psc1' -command '. C:\Program Files\Microsoft\Exchange
Server\bin\Exchange.ps1'
It's what I read in the Exchange Management Shell shortcut.
What I really need to run is Set-Mailbox.
Btw. Powershell on this computer isn't script-enabled and it's version 1.
It's not a computer I can play around with so I'd rather not change
anything.
Thanks a million!
/Sofia
(Have been on maternity leave for 2+ years so I havn't played with the new
toys like exchange powershell and such.)



