Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powershell script help

Status
Not open for further replies.

texasit

MIS
Jun 26, 2008
21
US
Ok I have a vbscript which creates a user account in AD but I have to open exchange management console to create the mailbox for the user.Is there a powerscript that I can run at the end of the vbscript that will enable the mailbox for that user I just created?
 
You should be doing everything in PowerShell. No vbscript. You don't mention the version of Exchange, so the method is different. For 2007, you could load the snapin. In 2010, you could use a remote PowerShell session to the Exchange server to create the mailbox.

Let me know which version and we can go from there.

Do you have your Tek-Tips.com Swag? I've got mine!.

Stop by the new Tek-Tips group at LinkedIn.
 
thanks for your reply 58sniper , sorry I forgot to mention which version of exchange I'm running , I'm running exchange 2010.I think running everything in powershell would be great but it would be alot of work to recreate my user creation script in powershell.
Isn't there a way to call powershell at the end of my vbscript using something like this:

set wshshell=wscript.createobject("wscript.shell")
wshShell.Run "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe Enable-Mailbox -Identity 'bjones' -Alias 'Bjones -Database 'fielddb01'?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top