?
Solved

simple powershell script to create new AD user and mailbox

Posted on 2011-09-27
1
Medium Priority
?
859 Views
Last Modified: 2012-05-12
hello all - im looking for a simple powershell script that can automate the new user and mailbox creation process.  Ideally - the script will ask for things like first name, last name, display name, mailbox database, email address, alias, you know, all the standard stuff.  

I don't need to read in input from csv, can anyone help?
thanks!
0
Comment
Question by:RandyGeorgeRedSox
[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
1 Comment
 
LVL 1

Accepted Solution

by:
Ganesh G earned 2000 total points
ID: 36713226
before all that ,
$password = Read-Host "Enter password" -AsSecureString;


New-ADUser -SamAccountName  -Name "name" -UserPrincipalName "UPN" -AccountPassword (ConvertTo-SecureString -AsPlainText "Password" -Force) -Enabled $true -PasswordNeverExpires $true -Path 'CN=Users,DC=domain,DC=net.


this a way to create a AD user alone ..


New-Mailbox -UserPrincipalName user@domain.com -PrimarySmtpAddress user@domain.com -Alias "name" -Database "Database Name" -Name "FUllname" -OrganizationalUnit "YourDomain.com/OU" -Password $password -FirstName "Name" -LastName "name" -DisplayName "Display name" -ResetPasswordOnNextLogon $True

Regards ,
Ganesh
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

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.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

800 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