Unable to move Federated Mailbox in Exchange 2010

Exchange 2010 Mailbox server role installation create a default mailbox database which consist of System mailboxes and a Federated mailbox.
As we all know, in case if we decide to remove this Default mailbox database we need to move all mailbox to a different Database.

In one case while trying to move Federated mailbox I was getting error “Mailbox size 1.009 MB exceeds target quota 1 MB”
SCAP-0276

Though the destination Database had no limit defined.
Tried to move by defining limit on database, still of no use.
Tried to remove quota from Federated Mailbox, in this case I was greeted with error similar to “Cannot find the on DC01.domain.com” (I don’t remember the exact error)
Continue reading

Advertisements

How to find and report nested groups in Active Directory using PowerShell

Since I started working with and learning Powershell, I try to find solution of complicated tasks which seems to be simple when we put in one Sentence.
Well, one way is to double click a group and check the members tab and enter in Excel rows and columns. If I have nothing else to do and I love clicking mouse buttons then I guess that will be a nice time killer job. or else find a 3rd party software a freeware or shareware with limitations that does not really most of the time gives what I need.

Fortunately my favorite is PowerShell !.,

Here is the result
image

Continue reading

List Users and their Group Membership using PowerShell

In some cases you might need to prepare a report on list of Active Directory users and their group Membership. One of the case recently I came across is for Auditing purpose.

In this Organization we have approximately 1600+ users and there was incomplete documentation for this scenario.

There was no other way than writing small PowerShell script.

SCAP-0284
Note: There might be some other ways as well to script and accomplish this task. Continue reading

Export Active Directory User details to Excel using PowerShell

I am a frequent visitor of Experts-Exchange.com, I have seen many questions people are asking which are related to bulk management, for example; Exporting User details from AD and they need some specific data only, Exporting Exchange 2010 mailbox details.

Mostly this kind of questions comes up when administrators need to make some kind of report or analyze the infrastructure usage.

So I thought of putting simple 1 liner scripts together as per my knowledge.

Here we will try to get a report on some specific user details from AD. I am using Windows Server 2012 for the purpose of this demonstration and its going to very brief from very basics. Continue reading

Changing UserName and SMTP addresses in bulk

Recently I had to perform a task in which there was a need to change UserName, Alias and SMTP addresses associated with the user for approx 150 users. These were recently created users.

If I start doing it using GUI, am sure my whole day will pass in find, click.. click.. click..

I had to do little bit of manual work like generating a csv output for the users in the department OU and add new username and new email address column to it.

The final CSV looked like this.
image

Once ready with the csv file, lets import it in PowerShell and let it do its magic.

$userCol = Import-Csv -Path C:\Update-users.csv
Foreach($user in $userCol){
"Processing : "+$user.UserName
    Set-Mailbox -Identity $user.UserName -EmailAddressPolicyEnabled $false
    Set-Mailbox -Identity $user.UserName -Alias $user.NewUserName
    Set-Mailbox -Identity $user.UserName -EmailAddresses $user.NewEmail
    Set-Mailbox -Identity $user.UserName -EmailAddressPolicyEnabled $true
"Changing UserName from: "+$user.UserName+" TO: "+$user.NewUserName
    Set-Mailbox -Identity $user.UserName -SamAccountName $user.newUserName -UserPrincipalName $user.upn -Alias $user.NewUserName
    }

I did use a seperate set-mailbox for each task for easy to understand.

The script is self explanatory.

Hope it helps.