Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

List Archives

Subject: RE: [ActiveDir] OT: adding additional attribute to user creation script
Prev Next
You are not authorized to post a reply.

AuthorMessages
bdesmondUser is Offline

Posts:358

09/08/2008 3:44 PM  
Put the set-mailbox commands right after then new-mailbox command.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132

From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of John Christie
Sent: Wednesday, August 20, 2008 11:44 AM
To: activedir
Subject: [ActiveDir] OT: adding additional attribute to user creation script

Hi

Thanks to Brandon and Co, I managed to use the following script to automate the creation of various mailbox enabled user accounts:

************************************************************************
foreach($user in (import-csv user1.csv))
{
$mypassword = convertto-securestring $User.Password -asplaintext -force
New-Mailbox -name $user.Name -sAMAccountName $user.sAMAccountName -UserPrincipalName $user.UPN -database "EXC01\SCCCS\SCCCSDatabase" -Password $MyPassword -OrganizationalUnit "test.local/SCC" -ResetPasswordOnNextLogon
}

*************************************************************************

I now need to do the following:

1) I need to disable the 'Automatically update e-mail addresses based on email address policy' option found on the E-Mail Addresses tab for all users which are created. From looking on the net I need to do "Get-Mailbox -OrganizationalUnit "Name of OU" | Set-Mailbox -EmailAddressPolicyEnabled $False but where would I place this in the script?

2) I need to add a Proxy SMTP Address to all of the users accounts created in the CSV. I have the email addresses in the CSV file but I noticed that the New-Mailbox cmdlet doesn't give me the option to set this. How do I do this?

3) I need all the users to be a member of a security group....

How do I achieve my goal?

Thanks!

You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > RE: [ActiveDir] OT: adding additional attribute to user creation script



ActiveForums 3.7
AdventNet Banner
Friends

Friends

Namescape
Members

Members

MembershipMembership:
Latest New UserLatest:rwrabinowitz
New TodayNew Today:1
New YesterdayNew Yesterday:1
User CountOverall:4273

People OnlinePeople Online:
VisitorsVisitors:431
MembersMembers:0
TotalTotal:431

Online NowOnline Now:

Ads

Copyright 2008 ActiveDir.org
Terms Of Use