Solved

simple powershell script to create new AD user and mailbox

Posted on 2011-09-27
1
856 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:
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 NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

A safe way to clean winsxs folder from your windows server 2008 R2 editions
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
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 walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

717 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