Solved

simple powershell script to create new AD user and mailbox

Posted on 2011-09-27
1
851 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

813 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

14 Experts available now in Live!

Get 1:1 Help Now