Solved

simple powershell script to create new AD user and mailbox

Posted on 2011-09-27
1
847 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
1 Comment
 
LVL 1

Accepted Solution

by:
Ganyboy earned 500 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

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

I have been working as System Administrators since 2003. I recently started working as a FreeLancer and was amazed to find out that very few people are taking full advantage of their Windows Server Machines. Microsoft Windows Server comes with so…
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…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now