locked
how can i create a script to create a new mailbox for RemoteComputers in LAN ? RRS feed

  • Question

  • I knew how to create a mailbox in my PC with Exchange 2007.
    Now,How can i create a script to create a mailbox and set up new mail account on the RemoteComputers in a local area network ?
    and how can i show only my ComputerName with PowerShell ?
    (ex:my computer's name is stupid_boy,and i want to show it in PowerShell)
    Looking forward replies.
    Thanks.
    Saturday, November 26, 2011 5:26 AM

Answers

  • You do not need to access somebody's computer to create a new mailbox for this user.

    The New-mailbox command will create this mailbox on the exchange server. you do not have to access the end user computer for that.

    If you point is to configure Outlook with this account, you can do this with Autodiscover: http://technet.microsoft.com/en-us/library/bb124251.aspx

     

     

     

     

     

    Saturday, November 26, 2011 11:30 PM

All replies

  • To create a new mailbox, here are some links: 

    http://technet.microsoft.com/en-us/library/aa997663.aspx

    http://winzenz.blogspot.com/2006/08/creating-new-mailbox-using-powershell.html

    http://www.myexchangeworld.com/2010/02/powershell-provisioning-users/

     

    "set up new mail account on the RemoteComputers in a local area network ?" 

    What do you exactly mean ? Do you want to configure automatically Outlook to use a specific mailbox ?

     

    To display your computer name, just type this:

    $env:computername

    If you want to see more environment variable: type this : Get-ChildItem Env:

     

    Saturday, November 26, 2011 6:22 AM
  • "set up new mail account on the RemoteComputers in a local area network ?"

    I mean I want to create a new mailbox for other computers in a local area network via my computer .I want a script which i use it,it'll create new mailbox for computers which i want.
    I just type IP of other computers in my computer (in Exchange Management Shell),and Script will do it.

    I can't use this command : Senv:computername in Exchange 2007.Can you show me other way ?

    Thanks for replies.



    Saturday, November 26, 2011 7:10 AM
  • Normally mailbox will be created for user only. Do you need to create based on Computer hostname ?

    whatever name it is , you can create it providing input from a csv file Eg: import-csv name.csv |ForEach { new-mailbox .......

     

     

    Saturday, November 26, 2011 7:45 AM
  • "Normally mailbox will be created for user only"

    Assume : Users gave me access thier computer,and i can do everything in thier computer as them.

    I can access some  computer in a local area network with commands in PowerShell :

    winrm s winrm/config/client '@{TrustedHost="thier computer's IP"}'

    New-PSSession -ComputerName thierComputer'sIP -Credential(Get-Credential)

    Enter-PSSession -Id1

    After the password authentication, I was able to access their computer.


    Saturday, November 26, 2011 8:03 AM
  • You do not need to access somebody's computer to create a new mailbox for this user.

    The New-mailbox command will create this mailbox on the exchange server. you do not have to access the end user computer for that.

    If you point is to configure Outlook with this account, you can do this with Autodiscover: http://technet.microsoft.com/en-us/library/bb124251.aspx

     

     

     

     

     

    Saturday, November 26, 2011 11:30 PM