locked
Exchange POSH script to retrieve password, OU path and naming convention RRS feed

  • Question

  • I'm trying to create a script that will create a new Exchange 2010 Mailbox from a CSV file. This part if pretty straightforward. The issue I'm having is that I have to create this script to work in multiple environments. Each environment has their own naming convention, default password and OU path.

    What's the best way to retrieve this dynamic information and put it in to a Import-CSV script?

    Wednesday, August 22, 2012 6:09 PM

Answers

  • Hi

    You could set a user input before starting the script. Then, save those input as a variable, and use them in during the script

    For example

    $DefaultPW =  Read-Host "Enter your default password"
    $
    DefaultPW =  $DefaultPW.Trim();

    Hope it helps

    Cheers


    Zi Feng

    TechNet Community Support

    Friday, August 24, 2012 8:19 AM
    Moderator