Subscribe to RSS Feed

OpenSSL Usage tips

June 23, 2010 by admin

OpenSSL can be a complicated application to be sure. This page intends to shed some light on how to accomplish some typical operations, such as viewing a certificates details or creating a SSL (client) connection to an email server that supports STARTTLS.
View a certificates’ details
openssl x509 -in filename.crt -noout -text
Where filename corresponds to the X.509 certificate file, which typically would end in .crt, .cert or .pem.

 Viewing the details of a certificate revocation list (CRL)
openssl crl -in filename -noout -text
Where filename corresponds to the CRL file, which typically would end in .crl or .pem

 DER to PEM conversion
Converts a DER format certificate to PEM – which is more widely used in applications such as apache.
openssl x509 -out exported-pem.crt -outform pem -text -in derfile.crt -inform der

 Generate the hash value from a certificate
Sometimes useful when you want to store multiple CA certificates as separate files in a directory configured into your application.
openssl x509 -hash -noout -in certfile.pem

 Testing STARTTLS
Connects to a mail server and starts TLS session, shows all the server certs (certificate chain) with -showcerts.
openssl s_client -connect test.smtp.org:25 -starttls smtp -showcerts

Continue Reading »
No Comments


Check for needed packages

rpm -q krb5-libs

rpm -q krb5-workstation

rpm -q krb5-server

Install needed packages if missing

yum install krb5-libs

yum install krb5-workstation

yum install krb5-server

Note: krb5-server is not installed by default on Centos.

/etc/hosts

192.168.1.250 pdc.domain.int pdc

192.168.1.246 bdc.domain.int bdc

192.168.1.250 domain.int domain

192.168.1.246 domain.int domain

/etc/nsswitch.conf

passwd: compat winbind

shadow: compat

group: compat winbind

/etc/krb5.conf

default_realm = DOMAIN.INT

clockskew = 300

# default_realm = EXAMPLE.COM

DOMAIN.INT = {

kdc = pdc.domain.int

default_domain = domain.int

admin_server = pdc.domain.int

}

# EXAMPLE.COM = {

# kdc = kerberos.example.com

# admin_server = kerberos.example.com

# }

kdc = FILE:/var/log/krb5/krb5kdc.log

admin_server = FILE:/var/log/krb5/kadmind.log

default = SYSLOG:NOTICE:DAEMON

.domain.int = DOMAIN.INT

pam = {

ticket_lifetime = 1d

renew_lifetime = 1d

forwardable = true

proxiable = false

minimum_uid = 1

clockskew = 300

external = sshd

use_shmem = sshd

}

Testing Kerbose

kinit administrator

If you see no errors you can now join server to domain. First make sure samba is turned off and winbind is turned off.

service winbind stop

service smb stop

Now Join domain using the following command.

net ads join –U administrator

Now continue to configure samba configuration.

/etc/samba.conf

Note: Change
netbios name = SAMBA01 to server name

workgroup = DOMAIN

passdb backend = tdbsam

printing = cups

printcap name = cups

printcap cache time = 750

password server = 192.168.1.250

cups options = raw

map to guest = Bad User

include = /etc/samba/dhcp.conf

logon path = \\%L\profiles\.msprofile

logon home = \\%L\%U\.9xprofile

logon drive = P:

log level = 3

max log size = 50

winbind enum users = yes

debug timestamp = yes

usershare allow guests = No

idmap gid = 10000-20000

idmap uid = 10000-20000

security = ADS

domain logons = No

domain master = No

netbios name = SAMBA01

wins support = No

realm = DOMAIN.INT

template homedir = /home/%D/%U

winbind refresh tickets = yes

template shell = /bin/bash

# winbind separator = +

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

dns proxy = no

comment = sites

inherit acls = Yes

inherit permissions = Yes

path = /var/www/html

browseable=yes

read only = No

create mask = 775

directory mask = 775

valid users = @”DOMAIN\Domain Admins”, @”DOMAIN\Developers”

Now Turn on winbind and make sure you can see users and groups

service winbind start

wbinfo –u

wbinfo –g

Samba Hints

winbind separator = + is used to change DOMAIN\user to DOMAIN+user

Trouble Shooting using Log files: /var/log/samba/smbd.conf

Continue Reading »
No Comments

Windows 2008 Direct Server Return not working

If you are having issues with getting Windows 2008 to work with DSR (Direct Server Return), chances are you have disabled your firewall and had no luck with it working, but after the commands below are executed you should be up and running.

netsh interface ipv4 set interface “net” weakhostreceive=enabled
netsh interface ipv4 set interface “loopback” weakhostreceive=enabled
netsh interface ipv4 set interface “loopback” weakhostsend=enabled

Continue Reading »
No Comments

Exchange 2007 SP2 goes wrong

January 8, 2010 by admin
Exchange 2007 SP2 goes wrong

Exchange 2007 has the feature of reinstalling a server the exact way it was when it was operational. I ran into an issue in my development environment where I had to reinstall the server from scratch because it would not uninstall exchange 2007 or upgrade to Service Pack 2. Because this was a dev server I simply reinstalled the server from scratch. Installed Windows updates, I should also mention the server has to be the exact name it had before and was rejoined to the domain.
The first step I performed was putting in the Exchange 2007 CD and open up a command prompt
Change directory to CD drive, in my case the CDROM is D drive.
Type in the following command
setup /mode:recoverserver

In my case, I was missing patches that were needed by exchange installation. I visited Microsoft website plugged in all Error ID’s and download the needed software, but as you can see from the output it knows the exact way this server setup before.
After installing needed patches, I begain to run the command setup /mode:recoverserver again. As you can see from the output screen still no luck.

 
I searched for a bit on Google and had no luck with fixing this issue, so I decided to go to Plan B, I would force remove the server from active directory and reinstall exchange.

I Lunched ASEDIT, and added Configuration
I Click on Plus sign next to Configuration, CN=Services, CN=Microsoft Exchange, CN=DomainName, CN=Exchange Administraive Groups, CN=Servers
Here I delete the server having issues.

 
I got a prompt and clicked on Yes to continue

I got a warning stating you will be deleting the container and everything in it. I clicked on yes to continue.

 
 
I notice exchange wrote that my server was in recover mode because when I ran the installation again it told me I had to do a server recovery. I went to control panel and clicked on add remove programs and notice exchange installation was presient. I click on remove and uninstalled it. After this I check registry on the server and notice the registry and was still there, so I decided to remove it.
 
I Launched Regedit
Navigate to
+HKEY_LOCAL_MACHINE
+SOFTWARE
+MICROSOFT
Here I deleted the +EXCHANGE folder
 

After this I had to reboot my server because exchange was complaining that it has to reboot before starting any new installation.
Now I ran into a weird installation issue, my Default Offline Address Book was corrupted. Got this error during installation

I proceeded to delete it and recreate it with the following power shell commands.
C:\>Remove-OfflineAddressBook "Default offline address book"
Confirm
Are you sure you want to perform this action?
Removing Offline Address Book "Default offline address book".
Help
(default is "Y"):y
Confirm
The offline address book that you selected for removal is the default offline
address book. If you continue, Outlook users may not be able to access their
offline address books.  Are you sure you want to delete Default offline address
book?
Help
(default is "Y"):y
 
C:\>New-OfflineAddressBook "default offline address list" -AddressLists "default global address list" -Server exmbx01

 
 
After this, I was finally able to install exchange successfully.
 
 

Continue Reading »
No Comments
Configuring IPHONE with Exchange 2007 Active Sync

Configuring IPHONE with Exchange 2007 Active Sync
From your IPhone navigate to settings menu and select Mail, Contacts, Calendars

Now fill in the following box as follows

Email: Your email address
Username : your email address
Password: your password

After verification you would be brought to this screen.
Under server box input the OWA URL
For example: mail.example.com

 
After clicking on next the setup will complete and you will be brought to what you would like to sync, after selecting what you would like to sync click on save to complete wizard.

Continue Reading »
No Comments
Managing  your Active Sync Device from Outlook Web Access in Exchange 2007 SP1

Managing your Active Sync Device from Outlook Web Access in Exchange 2007 SP1
In Exchange 2007, Outlook Web Access (OWA) offers a portal for users to manage their Exchange Active Sync (EAS) devices.
How to access that information?

  • Log on to OWA
  • Click "Options"
  • Click "Mobile Device"
  • Here is what the page looks like:

    Note: If ActiveSync is not enabled for the Exchange user, "Mobile Device" tab won’t be shown. You can run the PowerShell command to check the status. Here is the result from a test server for example:
    D:\Documents and Settings\ Administrator >Get-CASMailbox -Identity:test |fl ActiveSyncEnabled
    ActiveSyncEnabled : True
    What can the page do for you?
    Note: The following includes the Exchange 2007 and Service Pack 1 (SP1) features:
    1) Device status
    As shown in the snapshot, the page will list all the Active Sync devices that the Exchange user has ever synced. Each device will be identified with its Type, Last-Sync-Time, and Status, which contains detailed device information, such as First-Sync-Time, User-Agent, etc.
    Note: Exchange has provided the protocol support to let the device send up the device-related data (e.g. Friendly Name, OS, Phone number, etc) to the server. But not all devices implement that part of protocol. Therefore, it’s possible that you won’t see all the data shown in the screenshot.
    On the server side, the Exchange administrator can use the following PowerShell command to get the same data.
    D:\Documents and Settings\Administrator>Get-ActiveSyncDeviceStatistics -mailbox:test
    FirstSyncTime : 5/11/2007 10:07:47 PM
    LastPolicyUpdateTime :
    LastSyncAttemptTime : 5/11/2007 10:07:56 PM
    LastSuccessSync : 5/11/2007 10:07:56 PM
    DeviceType : PocketPC
    DeviceID : v120Device
    DeviceUserAgent : NSync
    DeviceWipeSentTime :
    DeviceWipeRequestTime :
    DeviceWipeAckTime :
    LastPingHeartbeat :
    RecoveryPassword : ********
    DeviceModel :
    DeviceIMEI :
    DeviceFriendlyName :
    DeviceOS :
    DeviceOSLanguage :
    DevicePhoneNumber :
    Identity : test@contoso.com\AirSync-PocketPC-v120Device

    2) Remote Wipe

    This is a very handy feature that was only available to Exchange administrators in Exchange 2003. Now an EAS user can wipe his/her device, primarily in case of device loss. Once the link is clicked and confirmed, the wipe command will be issued to the server and the link will change to "Cancel Wipe Request". (SP1 feature)

    As you can infer, there is still a chance for the EAS user to cancel a wipe request if he/she initiated it by accident or subsequently found the device. But the courtesy time is short – once the device initiates a sync to the server and picks up the wipe command, it will be too late to undo the request.
    Right before the device clears its data, it will send a last notice to the server. Accordingly, the server will be very friendly to send the device owner a "Remote Device Wipe Confirmation" email, telling you the device is cleared. (SP1 feature)

    Note: After the remote wipe, if you luckily find your lost device and want to re-sync it, you must remove it from the OWA device list (refer to "Remove mobile device" section for more info). Otherwise, it will keep on re-wiping itself. This is a security feature by-design.
    The following shows how to wipe and cancel wipe with corresponding PowerShell command:
    D:\Documents and Settings\Administrator>Clear-ActiveSyncDevice -Identity:test@contoso.com\AirSync-PocketPC-v120Device
    Confirm
    Are you sure you want to perform this action?
    Clearing Mobile Device
    "test@contoso.com\AirSync-PocketPC-v120Device". All the data on the device will be permanently deleted.
    Help
    (default is "Y"):y
    D:\Documents and Settings\Administrator>Clear-ActiveSyncDevice -Identity:test@blah- dom.blah.com\AirSync-PocketPC-v120Device -Cancel:$true

    3) Remove mobile device partnership

    This is the first link above the device table. Basically what it does is to clean up the sync state data of the selected device on the server. It’s useful in several situations:
    a. Clean up data: if you switch to a new device, the legacy data of the old device will still hang around occupying your mailbox space. You can find the device and clean it out.
    b. Terminate remote wipe: as being said, if you want to re-sync your device after a remote-wipe, you have to come to here to remove it first.
    c. Start from scratch: well, theoretically this wouldn’t happen, but it might in the real life – if you feel your device is not working properly and want to start a fresh sync from the scratch, you can remove the device partnership from the server (i.e. here) and the device, then get fresh restart.
    The corresponding PowerShell command for the admin is as following:
    D:\Documents and Settings\Administrator>Remove-ActiveSyncDevice -Identity:test@contoso.com\AirSync-PocketPC-v120Device
    Confirm
    Are you sure you want to perform this action?
    Removing mobile device
    "test@contoso.com\AirSync-PocketPC-v120Device". All dataabout the device will be removed. The device must be re-synchronized.
    Help
    (default is "Y"):y

    4) Pin Recovery

    This is a nice feature to give the EAS user a chance to unlock the device if he/she forgets the device PIN. Clicking the "Display Recovery Password" will show a pop-up dialog bearing the Recovery Password. Here, I’d like to call out that the recovery password is NEITHER the same as the device PIN and, for example on Windows Mobile (WM) devices, NOR used in the same way. Actually its usage is sort of tricky: Menu, then Reset Password, <type in new password> then <type in Recovery Password>.
    There is no related PowerShell command for an Exchange administrator to get this info due to security reasons.
    5) Retrieve Log

    Starting with Exchange 2007, we provide a light-weight server logging to track details of the last 15 (configurable) requests/responses and possible errors for problem diagnosis. By default, the logging is off. It can be turned on and tweaked easily from web.config:
    <add key="MailboxLoggingEnabled" value="true"></add>
    <add key="NumOfQueuedMailboxLogEntries" value="15"></add>
    <add key="MaxSizeOfMailboxLog" value="8000"></add>

    After the Exchange administrator turns on the logging and device starts syncing, a "Retrieve Log…" link will show on the OWA device page to let the device owner grab the log, which will be dropped into the Inbox as an attachment of an Action email, titled as "Log retrieved for device: XXXXXX". The log can be very useful to Microsoft support personnel in diagnosing EAS issues.

    Continue Reading »
    1 Comment
    Re-installing  the Cluster nodes in an Exchange 2007 CCR-based Mailbox Server Setup

    Re-installing the Cluster nodes in an Exchange 2007 CCR-based Mailbox Server Setup
    Re-Installing the first CCR Node
    The very first thing you’ll want to do is to logon to one of the CCR nodes. Then ensure the Windows cluster resources and the clustered mailbox server is owned by the opposite node than the one you’re going to reinstall first. To see which node owns the Windows Cluster resources, open the Windows Cluster Administrator console, then select the Groups node as shown in Figure 1 below. As you can see in the right pane the owner for both the Windows Cluster Group and the CMS is revealed.

    Figure 1: Cluster Administrator Console
    Note:
    You can also see which node owns the CMS by typing Get-ClusteredMailboxServer | FL in the Exchange Management Shell (EMS). If you’re running Exchange 2007 SP1, you can even use the Exchange Management Console (EMC) to check this. This is done under the Server Configuration work center, where you open the Property page for the CMS and then click the Clustered Mailbox Server tab).
    If the resources are owned by the node you planned on reinstalling first, you must move them to the other node. As you probably had the CMS running in production for quite some time, I shouldn’t need to tell you this but remember that it’s only supported to move the Windows Cluster Group using the Windows Cluster Administrator. The CMS must be moved using either the Move-ClusteredMailboxServer cmdlet (Figure 2) or if you’re using Exchange Server 2007 SP1 by using the Manage Clustered Mailbox Server wizard in the EMC (Figure 3).

    Figure 2: Moving the clustered mailbox server using the Exchange Management Shell

    Figure 3: Moving the clustered mailbox server using the Exchange 2007 SP1 Management Console
    When the Windows Cluster Group and CMS have been moved to the other node, we can begin uninstalling the Mailbox server role. To do so, open the Control Panel and then Add/Remove Programs. Select Microsoft Exchange and click Remove (Figure 4). This will launch the Exchange 2007 Setup wizard.

    Figure 4: Clicking Remove in Add or Remove Programs
    On the Exchange 2007 Setup wizard maintenance mode page, click Next then untick Passive Clustered Mailbox Role and Management Tools. Click Next again.

    Figure 5: Removing the Passive Clustered Mailbox Role
    Let the readiness checks complete then click Uninstall (Figure 6).

    Figure 6: Readiness Checks completed successfully
    When the passive clustered mailbox role have been uninstalled, click Finish (Figure 7).

    Figure 7: Exchange 2007 Passive Mailbox role and Management Tools removed successfully
    With the passive clustered mailbox server role uninstalled, we can evict the node from the Windows cluster. To do so, open the Cluster Administrator console, then right-click on the respective node and select Stop Cluster Service in the context menu as shown in Figure 8.

    Figure 8: Stopping the cluster service
    When the cluster service has been stopped, we are able to evict the node. Do so by right-clicking on the node that’s now offline then select Evict Node (Figure 9).

    Figure 9: Evicting the cluster node
    We’ll get a warning message like the one shown in Figure 10, click Yes.

    Figure 10: Warning message
    We have now removed the node from the Windows cluster (Figure 11).

    Figure 11: Cluster Administrator with one node
    We can begin to re-install the operating system, but before you do so please make sure you have the NetBIOS name, IP addresses, LUNs etc. documented, so you know how to configure these things when Windows Server 2003 has been reinstalled. Before we re-add the node to the Active Directory domain, we must also make sure the computer account is reset. To do so open the Active Directory Users & Computer MMC snap-in, then select the respective computer account object, right-click on it and select Reset Account on the context menu (Figure 12).

    Figure 12: Resetting the Active Directory Computer account
    When the cluster node has been reinstalled and you have configured the NetBIOS name, IP addresses, and LUNs as well as added the node to the Active Directory domain, the next task is to re-add the node to the Windows Server cluster. To do so, open the Cluster Administrator console and then right-click somewhere in the left pane. In the context menu, select New > Node as shown in Figure 13 below.

    Figure 13: Adding a new node to the Windows Server 2003 cluster
    On the Add Notes Wizard welcome page, click Next, then enter the NetBIOS name of the node you’re re-adding to the cluster and click Add (Figure 14). Click Next.

    Figure 14: Entering the NetBIOS name of the node to be re-added to the cluster
    The cluster wizard will now analyze the cluster configuration (Figure 15). When finished click Next.

    Figure 15: Cluster configuration wizard analyzes the cluster configuration
    We now need to enter the password for the cluster service account (Figure 16). When you have done so, click Next.
    Note:
    Although I use the Administrator account as the cluster service account in my lab, you should always create a dedicated cluster service account for the cluster when dealing with production environments.

    Figure 16: Specifying the password for the Cluster Service Account
    Now verify you want to add the node to the proposed cluster configuration and click Next (Figure 17).

    Figure 17: Proposed Cluster Configuration
    Wait for the cluster to be configured and when possible click Next and finally Finish to exit the Cluster setup wizard (Figure 18).

    Figure 18: Cluster is configured
    The clustered mailbox server in the lab I’m using for the purpose of this article is running Exchange 2007 SP1, which is why I use the Exchange Server 2007 SP1 binaries to re-install the passive Mailbox role. If you’re CMS haven’t yet been upgraded to Exchange 2007 SP1, it’s important you use the Exchange 2007 RTM binaries to re-install the passive Mailbox role.

    Figure 2.1: Exchange Server 2007 SP1 splash screen
    On Introduction page, click Next > accept the License Agreement and click Next. Decide whether or not you want to enable error reporting, and then click Next once again.
    On the Exchange 2007 Setup Installation Type page, select Custom Exchange Server Installation and click Next (Figure 2.2).

    Figure 2.2: Selecting a Custom Exchange Server Installation
    Now tick Passive Clustered Mailbox Role. If you installed the Exchange 2007 binaries at another location than the default, this is also the page on which you change the installation path (Figure 2.3). Click Next.

    Figure 2.3: Selecting Passive Clustered Mailbox Role and specifying the Installation path
    The readiness checks will now be performed. This will normally complete without any issues or errors, but if you like me forgot to remove the database and log files from the Database or Log file LUNs, you’ll receive an error similar to the one shown in Figure 2.4.

    Figure 2.4: Readiness Check error as databases are present on the database LUN
    When removed, you should see a Readiness Checks page like the one in Figure x (of course without the 32-bit version warning). Click Install.

    Figure 2.5: Readiness Checks Completed Successfully
    The installation process will now begin and after a few minutes you should get a completion page as shown below (Figure 2.6).

    Figure 2.6: Installation of Passive Clustered Mailbox Role installed successfully
    Now that the Exchange 2007 SP1 binaries have been installed, we must reboot the node before continuing with the next steps.
    Next step is to reseed the storage group copies, so that the CCR node gets up to date replicas of each the active databases. This can be done using the Exchange Management Shell and when speaking Exchange 2007 SP1 the Exchange Management Console (EMC) UI. In this article, we’ll use the EMC UI, so launch the EMC. In the EMC, select the clustered mailbox server under the Server Configuration work center. As we can see in Figure 2.7 below, the copy status is currently in a failed mode, which is expected.

    Figure 2.7: Copy status is currently in a Failed state
    If we open the Property page for one of the storage groups and click on the Cluster Continuous Replication tab, we can also see that no logs have been copied to the newly installed CCR node.
    Start the replication
    You will need to run following power shell commands to start the replication. You will be running this exchange shell commands on the node you have reinstalled. Locate Exchange Management Shell and fire it up.
    Suspend-StorageGroupCopy -Identity “exmbx01\first storage group”
    Now on the node you have reinstalled go to the directory that contains log files for the storage group, in my example it is located on
    C:\MountPoints\Clusterdisk1\FirstStorageGroup\Logs\
    Remove any files located in this directory.
    Now we need to reseed storage group to new node. Open up Exchange Management Shell and run the following command.
    Update-StorageGroupcopy –Identity “exmbx01\first storage group”
    Depending on the database size, it can take a bit of time.
    After you should see that the status is healthy

    Continue Reading »
    3 Comments
    System Center Data Protection Manager 2007

    System Center Data Protection Manager 2007
    In this post, I explain how you can use System Center Data Protection Manager 2007 (hereafter DPM) to recover a single Exchange Server 2007 mailbox to a Recovery Storage Group (hereafter RSG) and ‘merge’ the restore with the actual mailbox.

    On our production environment, we have Exchange Server 2007 SP1 SCC running on a Windows Server 2008 failover cluster.

    Before continuing, make sure you have created a Recovery Storage Group on your Exchange 2007 mailbox server for the mailbox database that you want to restore to. This can be done via GUI (Toolbox > Database Recovery Management) or via Powershell.

    new-storagegroup -Server <Server_Name> -LogFolderPath path_to_Logfiles> -Name <RSG_Name> -SystemFolderPath <Database_Path> -Recovery

    On the DPM server, click on the Recovery tab, and navigate through the hierarchy and locate the storage group that contains the mailbox that you want to recover. Double clicking on the mailbox database, shows a list of mailboxes. Right click on the mailbox you want to restore and click Recover. You can also select a date and time of the recovery point from which you would like to restore.

    In the Recovery Wizard, review the recovery information click Next and select the recovery type. Click browse to select your mailbox server. You will have to manually type the Storage Group Name (specify your Recovery Storage Group name here) and your Database Name (the mailbox database name inside your RSG).

    Click Next, review the options and begin the restoration process.

    Once the recovery process is complete, go back to the Exchange 2007 mailbox server. Open Exchange Management Console –> Toolbox –> Database Recovery Management.

    Mount the Mailbox database that you just restored in the Recovery Storage Group. This shouldn’t require more explanation.

    After mounting the database, come back to the above menu and select Merge or copy mailbox contents.

    Select the mailbox database that contains the mailbox you want to recover and click Gather Merge information. On the next screen, review the merge options and click Perform pre-merge tasks.

    Select your mailbox and click Perform Merge actions. Once the process completes, review the result.

    The restored mailbox on the RSG database is now merged with the production database.

    Continue Reading »
    No Comments
    Exchange 2007  Recovery Storage Group With NTBACKUP

    Exchange 2007 Recovery Storage Group With NTBACKUP
    Exchange 2007 Recovery Storage Group : utilizing power shell

    Microsoft introduced the Recovery Storage Group with Exchange 2003 which added some nice recovery functionality; we no longer needed a recovery AD forest to restore items to mailboxes or a single mailbox. Exchange 2007 has kept this feature however has drastically changed the interface and added the ability to use power shell for recovery.

    For this article I am going to focus on using power shell only to recover mailboxes and messages to a mailbox. One big change is that even when a RSG is created you will not see it with the gui (EMC) and it can only been see via power shell.

    First let’s start by logging onto a mailbox and seeing the content

    As you can see we have 3 new messages in Jodie’s mailbox

    Now we can use NTBackup to backup our Exchange servers database

    1. Launch NTBackup from the system tools

    2. Select next on the backup/restore wizard

    3. Choose the radius button to backup files and settings

    4. Select the radius button “Let me choose what to backup”

    5. I am only going to backup the first storage group since that is the location of mymailboxes

    6. Specify the location of the backup (D:\backup)

    7. Click finish to start the backup

    Here we can see our backup file has been created.

    Now that we have a current backup I am going to delete the messages from Jodie’s mailbox so that we can then use a recovery storage group to recover the data .

    Lets create a new RSG and take a look in the gui and then the command line.

    To create an RSG we use the new-storagegroup commad but add the -Recover switch

    new-storagegroup -Server vmmbx1 -LogFolderPath d:\rsg\logs -Name ExchangeGenie

    -SystemFolderPath d:\rsg\data -Recovery

    now that we have created our RSG let see if we get any info from EMC

    As you can see the RSG does not show up

    but if we do a get-storgegroup fl our new RSG will be shown

    notice the recovery option is set to true

    Now that we have created an RSG we need to add the database we want to recover

    new-mailboxdatabase -mailboxdatabasetorecover “Mailbox Database” -storagegroup Vmmbx1\ExchangeGenie -edbfilepath “D:\RSG\Data\mailbox database.edb”

    We do not need to set this database can be overwritten since that is enabled by default.

    Now that we have created our RSG and added the appropriate database to the RSG we now have to restore the data from backup.

    1. Launch NTBackup

    2. Click Next

    3. Select the backup we want to restore

    4. input a temp location for the patch file and Check “Last Restore”

    **since this is a full backup and no other logs are to be restored the last restore check box is marked”***

    5. Click Next to start the restore

    6. Click close after the restore completes

    You can see we now have data restored to our recovery database location.

    Now that the data has been restored from our backup we need to mount the recovery database

    mount-database -identity ‘vmmbx1\exchangegenie\mailbox database’

    Now that we have created our RSG, added a recovery database, and restored our data from backup we can now recover data to our users mailbox.

    I will perform 3 different recoveries

    1. Merge data back into a users mailbox

    2. Merge data back into a sub folder in the users mailbox

    3. Merge data to another users mailbox into a subfolder

    Merge Data back to the original location

    The following command will merge the data from our recovery database back to the original live mailbox.

    Restore-Mailbox -id ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’

    You can see that all our messages have been brought back to the original location

    Merge data into a sub folder in a users mailbox

    Restore-Mailbox -RSGMailbox ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Jodie.Bartos’ -targetfolder ‘RestoredMail’

    You can see we have a new folder called RestoredMail which has a copy of the user inbox

    Merge data to another users mailbox into a subfolder

    Restore-Mailbox -RSGMailbo ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Brian.Tirch’-targetfolder ‘JodiesMbx’

    You can see my mailbox now has a subfolder called JodiesMbx with a copy of all her data

    There are a number of recovery options that I did not mention in this blog i.e datarate,keywords, etc… that allow a more flexable recovery

    After we completed our recover we need to remove the RSG, this is an item that you should not keep unless you are utilizing it.

    First we need to dismount the database

    Dismount-database -identity ‘vmmbx1\exchangegenie\mailbox database’

    Now that we have dismounted the database we need to remove it

    Remove-MailboxDatabase -identity ‘vmmbx1\ExchangeGenie\Mailbox Database’

    **Note this will not delete the files from the drive, you must manually delete the restored database ***

    The last step we need to remove the Recovery Storage Group

    Remove-StorageGroup -identity ‘Vmmbx1\ExchangeGenie’

    To validate our RSG is gone we need to use the Get-StorageGroup command

    Continue Reading »
    No Comments
    Using EXMerge.exe to migrate Exchange 2003 users to PST

    Downloading Exmerge
    Visit URL http://microsoft.com and search for exmerge

    After download is complete, extract emerge files to C:\Program Files\Exchsrvr\bin ( This would be the directory where your exchange installation files are located)


    Running Exmerge
    Open Command Prompt

    Change directorys to C:\Program Files\Exchsrvr\bin

    cd C:\Program Files\Exchsrvr\bin

    Now type in exmerge

    Now Exmerge welcome wizard comes up click on Next button to continue

    Leave default Rxtract or Import (Two Step Procedure) select and click on Next

    Leave default Step 1: Extract data from an Exchange Server Mailbox

    Fill in Microsoft Exchange Server Name and Domain Controller (DC) Name: and click on Next

    Select Mailbox Database you would like to extract mail from and click on Next

    Now Select users you would like to extract mail from and click on Next

    Leave Default locale to English (US) and click on Next

    Create a directory for PST files to be extract to and click on Change Folder button and select folder, once done click on Next

    Save Settings page click on Next to continue

    Once extracting is complete click on Finish wizard

    Continue Reading »
    No Comments