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?
Dim objShell : Set objShell = CreateObject("Wscript.Shell")
-PSConsoleFile 'C:\Program Files\Microsoft\Exchange
Server\bin\exshell.psc1' -command '. C:\Program Files\Microsoft\Exchange
I get this:
Missing expression after unary operator '-'.
At line:1 char:2
+ -P <<<< SConsoleFile 'C:\Program Files\Microsoft\Exchange
psc1' -command '. C:\Program Files\Microsoft\Exchange
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
Thanks a million!
(Have been on maternity leave for 2+ years so I havn't played with the new
toys like exchange powershell and such.