Solved

simple powershell script to create new AD user and mailbox

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
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 the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

730 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