[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

create new user and mailbox process

Posted on 2008-10-09
6
Medium Priority
?
835 Views
Last Modified: 2012-06-27
I have a win2008 DC and a Exchange 2007 server. When I create new users I want to use as simple steps as possible, so is it recommended to create the user in AD first, then create the mailbox through ESM. Or can I use a single 'new-mailbox' command that will add all my desired info into the new account. If so how do I add (script) values of 'profile path' 'logon script' etc?

If I have to run two separate scripts (one for AD and one for mailbox) is there some kind of replication interval between being able to run the two scripts.
0
Comment
Question by:Pete
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:flaphead_com
ID: 22677228
if you use the new-mailbox powershell command you can create an ad user account at the same time
$user     = Read-Host "Enter Username.."
$password = Read-Host "Enter Password.." -AsSecureString
$OU       = Read-Host "Enter OU........"
 
$database = "<Change this to the database path>"
$ExternalEmailAddress = $user + "@<your domain>"
$txtfile = $user + ".txt"
new-mailbox -database $database -password $password -UserPrincipalName $ExternalEmailAddress -Name $user -OrganizationalUnit $OU
get-mailbox $user 

Open in new window

0
 
LVL 1

Author Comment

by:Pete
ID: 22677235
thanks:
If so how do I add (script) values of 'profile path' 'logon script' etc into the new account?
0
 
LVL 7

Expert Comment

by:flaphead_com
ID: 22677608
check out powergui (http://www.powergui.org/index.jspa) it's an addin to Powershell that lets you do more with the AD than the standard Exchange commands. All new-mailbox or even new-user will do is create a basic user.

Touching on something you mentioned before .. if you use the -DomainController switch, this should make running commands after each other okay, as they will update the same DC?
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 1

Author Comment

by:Pete
ID: 22677861
Thanks I like the interface of powershell but I still can't see how to create my users, can you please clarrify the process for me? -
Currently (win2003, ex2003) a new user comes and sees me and I use ADUC on the DC to create them, copying another user from the same OU\groups ete, it prompts for new mailbox and the store to put the mailbox in and I say 'OK'....great! Easy!
So HOW do I create a new user on Win2008, Ex2007? I need to specify: name, alias, OU and group membership, "profile path", "logon script" values as well as all the usual email address and managed mailbox policies etc.
This all seems very complicated.
As an aside will deleting the user in AD also delete the mailbox when they leave?
0
 
LVL 7

Expert Comment

by:flaphead_com
ID: 22678244
ah okay ... new-mailbox and new-user is for exchange 2007

powergui and a command line too, and I think that will work with "normal" powershell

If your using exchange 2003, and powergui then yes it will leave the mail disconnected

Not really  played with powergui much, but do understand it should do what you want
0
 
LVL 7

Accepted Solution

by:
flaphead_com earned 750 total points
ID: 22678356
You are going to need the following to stuff with the AD:

http://www.microsoft.com/downloads/details.aspx?FamilyId=993c0bcf-3bcf-4009-be21-27e85e1857b1&displaylang=en

and active roles powershell add-in: http://www.quest.com/powershell/activeroles-server.aspx

Once you have installed them, you can either use powergui or ActiveRoles Management Shell for Active Directory.

Set-QADUser looks like your friend
Use this cmdlet to change or remove values of attributes of a user account in Active Directory.

The cmdlet takes a series of optional, attribute-specific parameters allowing you to make changes to user attributes in Active Directory. Thus, to modify the value of the 'givenName', 'sn', or 'l' attribute, you can use the -FirstName, -LastName, or -City parameter, respectively.

If a given attribute is referred to by both the ObjectAttributes array and an attribute-specific parameter, the ObjectAttributes setting has no effect on that attribute. The cmdlet sets the attribute to the value specified by the attribute-specific parameter.

The cmdlet has optional parameters that determine the server and the security context for the operation. Normally,the connection parameters could be omitted so far as a connection to a server is established prior to using the cmd let. In this case, the server and the security context are determined by the Connect-QADService cmdlet.

If you do not use Connect-QADService and have no connection established prior to using a cmdlet, then the connection settings, including the server and the security context, are determined by the connection parameters of the first cmdlet you use. Subsequent cmdlets will use those settings by default.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question