Wednesday, November 27, 2013

Microsoft Exchange 2007 How to find what is inside Mailbox Database from Shell

In this Article, We are checking various options from the Exchange Management Shell

To avoid any Permission issue, Run Exchange Management Shell "Run As" Administrator or Account with Full Admin rights






How to find Mailbox Database
[PS] C:\>Get-mailboxDatabase

How to find Mailbox Database
[PS] C:\>Get-mailboxDatabase | FL Name, StorageGroup, Mounted, BackupInProgress, OnlineMaintenanceInProgress

How to find Mailbox Database
[PS] C:\>Get-mailboxDatabase -id "Name of the DB" | Get-Mailbox

How to find which Mailbox belongs to which Database
[PS] C:\Documents and Settings\Administrator>Get-mailbox | FL Name, Database

How to find list of the Mailboxes in Database
[PS] C:\>Get-mailbox -database "Database name" 

How to find Total number of Storage group 
[PS] C:\>Get-StorageGroup 

How to find list of the Mailboxes in Database
[PS] C:\>Get-mailbox -database "Database name" 


How to find list of the Mailboxes in Database
[PS] C:\>Mount-Database -Id "E2k7\RSG\"Mailbox Database" 

Understanding CCR log files
http://blogs.technet.com/b/timmcmic/archive/2009/09/21/log-files-required-to-be-copied-after-an-update-storagegroupcopy-re-seed-has-been-successfully-completed.aspx





Creating bulk users from Exchange management shell

Original script From : Script to download


When you have downloaded and extracted the scripts to your server – open a Powershell Console and navigate to the location where they are located – when there type in:

.\CreateUsersFromCSV.ps1

LabUsers01

When the script executes you will be presented with a Windows “Open” dialog box – navigate to the location where you extracted the files and then choose the sample CSV – see below;

LabUsers02

The script will then execute creating each user in your Active Directory Lab environment – the Default password is “Password1” – see below;

LabUsers03

When the script has completed – open Active Directory Users and Computers – you will see a new OU called “ExchangeUsers” – within this OU are the new accounts that you can play with – see below;

LabUsers04

Enable the users using Power Shell

Get-User -Filter {Department -Like 8* -And RecipientType -eq User} | % { Enable-MailUser $_ -externalEmailAddress $($_.name)@angrytech.com}

Another Script
-------------------------------
Get-User | Where-Object{$_.RecipientType –eq “User”}
Get-User –OrganizationalUnit People | Where-Object{$_.RecipientType –eq “User”}
get-user –organizationalUnit people | where-object{$_.RecipientType –eq “User” -and $_.department –eq “Sales”}
get-user –organizationalUnit people | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “EXCHANGE1\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database


Steps
From the powershell, run the .\CreateUsersFromCSV.ps1
and the confirm the user from Get-User in Active directory at OU=ExchangeUsers and in the below Exchange shell command rename -OrganizationalUnit People
Get-user –organizationalUnit people | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “EXCHANGE1\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database

Run the command from Shell
get-mailbox | fl name, database and from the resultant replace the Database after Enable-Mailbox -Database ""

So the new command would be
get-user –organizationalUnit ExchangeUsers | where-object {$_.RecipientType –eq “User” -and $_.department –eq “Sales”} | Enable-Mailbox –Database “E2K7\First Storage Group\Mailbox Database” | get-mailbox | select name,windowsemailaddress,database


Here OrganizationUnit is the location from ADUC where Exchange users created
and E2K7\First Storage Group\Mailbox Database is an example from my E2k7 DB




Thursday, November 21, 2013

Post Installing KB 2837618 2768005 Unable to set out of office settings, free busy contains no information

Issue : 
--------------------
After installing KB on Outlook 2013, users are complaining that they are unable to set "Out of Settings" and can't schedule Free busy information after Installing November Security Patches

but Owa users can set OOF and schedule meetings


Error:
---------------------
 "Your server location could not be determined."


WorkAround
---------------------
Creation of new profile while update 2768005 and 2837618 installed on the system, didn't working either, you need to remove both of the update and then create a new Outlook Profile.

Lots of users are complaining about this issue on Outlook 2013 with Exchange 2007.

Alternately Quit Outlook and try setting OOF from OWA and log back into Outlook and check if this settings can resolve the issue


There is no update released as far of now, wait for Microsoft to update about this issue in newer patch or update

Current issue on Technet http://social.technet.microsoft.com/Forums/en-US/827a12f0-c785-43df-a71f-0b21aeffa176/outlook-2013-freebusy-fails-after-updates?forum=officeitpro

Wednesday, November 13, 2013

Inspirational Quotes

“Experience life in all possible ways –good-bad, bitter-sweet, dark-light, summer-winter. Experience all the dualities. Don’t be afraid of experience, because the more experience you have, the more mature you become.”
- Osho

Continuous effort—not strength or intelligence—is the key to unlocking our potential.

- Winston Churchill

In order to grow, you must give up the struggle to remain the same, and learn to embrace change at all times.

–Michael A.  Singer


“if we do what we resolve to do then we can enjoy unlimited success” –Amit Malviya

"Focus on where you want to go, not on what you fear." - Anthony Robbins



Some of my suggestions are easier said than done. Just try. The intention is more important than immediate success. -


"It's determination and commitment to an unrelenting pursuit of your goal that will enable you to attain the success you seek."


"Sooner or later, those who win are those who think they can." - Richard Bach


People only treat you one way …… the way you allow them



एक छुपी हुई पहचान रखता हूँ, बाहर शांत हूँ, अंदर तूफान रखता हूँ, 

रख के तराजू में अपने दोस्त की खुशियाँ, दूसरे पलड़े में मैं अपनी 

जान रखता हूँ।




One night a father overheard his son pray: Dear God, Make me the kind of man my Daddy is. Later that night, the Father prayed: Dear God, Make me the kind of man my son wants me to be.
- Anonymous


The 3 C’s of life: You must make a choice to take a chance or your life will never change





Sunday, November 10, 2013

Bulk Mailbox Script



ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database}

SAVE THIS AS C:\ENABLEBOX.PS1
NEXT: Run the Script
Go to Exchange Management Shell
You can change the directory to the root by typing cd\ then hit Enter (NOTE: If you just typed the words "then hit Enter" you do not belong working on servers)

Then type: ./enablebox.ps1

Just in case you want to enable archive for all users in the csv add this to the above script. 
Add <| Enable-Mailbox –Archive -ArchiveDatabase "<enter archive db name here>"}> Shown below in its entirety. 

$mailbox=import-csv C:\<filename>.CSV
ForEach ($mailbox in $mailbox) {Enable-Mailbox -Identity $Mailbox.Identity -Database $Mailbox.Database | Enable-Mailbox –Archive -ArchiveDatabase "<enter archive db name here>"}



Reference : Mailbox Script

Unable to Mount Exchange 2010 Database on Hyper-V Guest MapiExceptionJetErrorOutOfMemory: Unable to mount database


Issue : On Exchange 2010 DAG database are not mounting

Error :
Couldn't mount the database that you specified. Specified database: DB1; Error code: An Active Manager operation failed with a transient error. Please retry the operation. Error: A transient error occurred during discovery of the database availability group topology. Error: Database action failed with transient error. Error: A transient error occurred during a database operation. Error: MapiExceptionJetErrorOutOfMemory: Unable to mount database. 

Resolution : 
In Hyper-V, Shutdown the Exchange VM to reset the Memory to multiple of 1024.
I reset the memory to 4096 MB and start the Exchange VM.
Now able to mount the Database.