INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Powershell script help

Powershell script help

(OP)
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?
 

RE: Powershell script help

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.

RE: Powershell script help

(OP)
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'?
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close