First, you should notice the comments at the beginning of the script. Think of this section as the script ??™ s
documentation. You should always put any information you feel is important for those interested in
using your script. As a good practice you should consider placing revision notes in this section if you
make changes to a script over its lifetime. At minimum your comments should include the script name,
script usage, and an example:
# bulk-newmailbox.v1.ps1
#
# Synopsis: This script creates one or more mailbox enabled user accounts based on
# input values read from a comma separated value (CSV) file. This script
# has to be run by an administrator who is a member of the Exchange
# Recipient Administrators group.
#
# The CSV file must contain these header values on the first line:
#
# Name,Database,OrganizationalUnit,UserPrincipalName,FirstName,LastName
#
# This script writes the results to log file bulk-newmailbox.log in the
# home directory of the current user. New entries are appended to an
# existing log file.
#
# Usage: bulk-newmailbox.v1.ps1 < full path to CSV file >
#
# Example: bulk-newmailbox.v1.ps1 c:\users.csv
The first segment of code is identical to that found in the simple script and uses the param keyword to
specify the input parameter value to set on variable $CSVUpath .
Pages:
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595