Search This Blog

Friday 31 May 2013

Exchange 2010 - How to bulk Import Users from a CSV file

This guide explains how to bulk import users into Exchange using CSV and Powershell

Create a CSV File

media_1370003015370.png

The first step is to get a CSV file with all your email addresses in and create different columns that contain the formatted data you want. This will take some skills in Excel to complete but once done you will need several columns with the names

Alias,Firstname, Lastname,Name,UPN,SAM,OUpath,AddressBook,Database,Password

These fields will provide the data for

Alias - Exchange Alias
FirstName - Users First Name
LastName - Users Last Name
UPN - Users login containing their domain name @cscm.co.uk for example
SAM - Users pre Windows2000 login name for domain
OUPath - Organisational Unit Path in Active Directory
AddressBook - Users Global Address Book
Database - Mailbox Database
Password - Users Password

 

Test Access to CSV File

media_1370003499326.png

The Excel file needs to be saved as a CSV file in a location that is accessible from the Exchange Server. In this example we use C:\IT Support\users.csv

Now to access the CSV file you can use this cmdlet

$users = Import-CSV "C:\IT Support\users.csv"

The result of this cmlet should show as above the details from the CSV file for all of the users, in this example we show one user.

 

 

Import a User

media_1370003578662.png

The PowerShell command to import the users is

Import-CSV "C:\IT Support\users.csv" | foreach {New-Mailbox -Name $_.name -Alias $_.alias -Database "Database NewDatabase" -OrganizationalUnit $_.OUpath -UserPrincipalName $_.UPN -SamAccountName $_.SAM -FirstName $_.Firstname -LastName $_.Lastname -Password (ConvertTo-SecureString $_.password -AsPlainText -Force) -ResetPasswordOnNextLogon $false -AddressBookPolicy $_.AddressBook}

What happens here is that the Import-CSV file reads the CSV file, we then pipe the output to the command foreach which for each row in the output it applies the cmdlet New-Mailbox.

Then in the New-Mailbox cmdlet we have variables that read the CSV column titles and apply the content to the cmdlet. For example the columns title Name is applied as $_.name

The password content is converted to a PlainText field so that it can be imported and not have to be entered manually into a credentials window.

You are now able to bulk Import Users into Exchange and Active Directory without the need to enter them manually.

Friday 10 May 2013

How to configure the Wireless LAN for a Cisco 877VAW Router

The Cisco 877VAW is a newer version of the 800 series routers and as a result has the AP built in on a different plane and so you have to login to the Wireless AP to be able to configure the WiFi. You do not do this from the Router config.

Note Wireless Interface

media_1368195459153.png

The router has a Wireless Interface called wlan-ap0 this is the service module interface, this is linked ip unnumbered to VLAN 1

Login to Service Module

media_1368195557889.png

You can connect to the service module with the command service-module wlan-ap0 session

Disconnect from Service Module

media_1368195563233.png

Once you are connected to the service module and you want to return to the router config you need to disconnect, this is done with the commands

Ctrl ^
x
disconnect

Wireless Config

media_1368195574827.png

You can now see the familiar config for a Cisco Wireless AP using IOS.

Acronis - Operations in Progress - The Answer!

As you may know I have posted on the Acronis Operations In Progress issue when you try to reboot a server that is running an Acronis Backup Job.

Well I have had a really good solution come in as a comment and credit where it is due.  If you want to resolve this issue without the need to iLO or hard reboot your server then look here.