Better Together BetterTogether - Site Home - TechNet Blogs

BetterTogether

Better Together is a Microsoft online compain that show the success stories of how Microsoft products work better together to give a big value. In this Blog all Microsoft Products Better Together Stories will be listed with Microsoft best practices for ea

BetterTogether

  • Replicate SCVMM 2012 Clustered VMs using Hyper-V Replica & SQL Always-On

    As one of the common scenarios for Disaster Recovery using Hyper-V Replica is to replicate System Center Virtual Machine Manager VM while depend on SQL Server 2012 Always-On to replicate the SCVMM DB, however when SCVMM is implemented to be high available...
  • Install Active Directory in Windows Azure in four simple steps

    Introduction: There is a very long and complex way to install Active Directory in Windows Azure environment described in details in Windows Azure documentation here http://www.windowsazure.com/en-us/manage/services/networking/active-directory-forest/...
  • Is AD integration or manual SCOM agents required to allow Automatic Windows Agent Failover between multiple SCOM 2012 Management Servers?

    Introduction: I observed that some IT professionals confused about System Center Operations Manager (SCOM) 2012 windows agents failover requirements, and the raised question was do I need to configure SCOM Active Directory Integration or do manual agents...
  • Downsizing HMC Environment to Prepare for Exchange 2010 SP2 Hosted Solution – Part3

    As most of Hosted Messaging and Collaboration (HMC) companies start planning to migrate to Exchange 2010 SP2 hosted environment due to the change in strategy that was announced about the future of /hosting mode here, so most HMC customer have to move directly to Exchange 2010 SP2 in hosted mode as discussed here, and one of the activities come up to migrate from HMC to Exchange 2010 SP2 is Downsizing activity in the running HMC environment to utilize part of hardware to be reused in the new Exchange 2010 SP2 environment, and although it looks like a simple activity for some IT people but there are a lot of challenges that can be in some cases for some specific HMC components show stopper to continue the downsizing activity, in this post series I will share all my experience with HMC downsizing activity and explain how I deal with different challenges in this activity, in Part1 I covered the first step of HMC downsizing activity to select server roles that will be decommissioned, then covered most of preparations tasks in each of the selected roles, and in Part2 I went through the most critical step of preparing Mailboxes for decommissioning that include the bulk mailbox move script that move mailboxes by calling MPS, one of the important resource while working in this activity is Microsoft Provisioning System SDK that can be downloaded from here.

    In this post I will finalize this post series by finalizing 2nd Step of preparations and both 3rd Step for decommissioning activity itself and 4th Step which is post decommissioning activity.

    So let me start with final preparations steps as follow:

    • If you run <QueryAllStore.xml> and still find some organizations assigned to any mailstore, then you should troubleshoot and find if there is any object (OU, User, Mailbox) that was removed in Active Directory and still existing in MPS and this object still allocated to one of mailstore in MBX server that you target for decommission, to solve this issue which is not easy to resolve there are different scenarios as follows:
      • Scenario1: If object was deleted by accident, then perform Active Directory Authoritative Restore as described here, and this option used only if the object deleted accidently.
      • Scneario2: deleted object not needed any more, then perform Database cleanup and then recreate the user if needed, to clean up the database you will need to know the GUID of the deleted object and this data can be retrieve from MPS SQL “PlanManager” with select statement like <Use PlanManager SELECT * from Customers>, once you get the GUID then you will need to run “DeleteCustomerByGUID” xml request (using provtest.exe)  to clean the MPS database from this object using the GUID you got using the SQL query..
    • Then you need to move the recovered mailbox from MBX server that is target for restore, and then to run <QueryAllStore.xml> again.

    3rd Step: Now the environment should be ready for 3rd step which is the decommissioning or uninstall the selected server roles as listed in 1st step and it is recommended to do one more verification step before doing uninstall which is shutdown the target server role for certain amount of time and validate the the whole HMC solution still functional and provisioning still working without problems, then to uninstall role by role and give time between each one for testing and verify HMC environment functionality.

    4th Step: which is the post decommissioning activities, and in this step you should use all available tools to verify the HMC functionality and solve any discovered issues (you need to confirm that there is an active Microsoft Support for the HMC environment that can be used in case you face any issue while decommissioning), as sample of these tools you can use the following:

    • Exchange Best Practices Analyzer
    • Exchange Connectivity Analyzer
    • OCS Connectivity Analyzer
    • Do some provisioning activities through the available control panel
    • Event Viewer

    Hope that this post series can reducing the risk of downsizing activity and make it easier for consultant who will do the activity.

  • Downsizing HMC Environment to Prepare for Exchange 2010 SP2 Hosted Solution – Part2

    As most of Hosted Messaging and Collaboration (HMC) companies start planning to migrate to Exchange 2010 SP2 hosted environment due to the change in strategy that was announced about the future of /hosting mode here, so most HMC customer have to move directly to Exchange 2010 SP2 in hosted mode as discussed here, and one of the activities come up to migrate from HMC to Exchange 2010 SP2 is Downsizing activity in the running HMC environment to utilize part of hardware to be reused in the new Exchange 2010 SP2 environment, and although it looks like a simple activity for some IT people but there are a lot of challenges that can be in some cases for some specific HMC components show stopper to continue the down activity, one of the important resource while working in this activity is Microsoft
    Provisioning System SDK that can be downloaded from here.

    In this post series I will share all my experience with HMC downsizing activity and explain how I deal with different challenges in this activity, in Part1 I covered the first step of HMC downsizing activity to select server roles that will be decommissioned, then covered most of preparations tasks in each of the selected roles.

     

    In this post I will cover the preparations specific for Mailbox Role which is the most critical role of downsizing activity, and different preparations steps for Exchange MBX role can be divided as follows:

    • Validate that no Public folders in the selected MBX servers that are target for decommission or you will need to move public folder to another MBX server.
    • Verify which MBX server configured as Offline Address Book Server, OAB MBX server better to be excluded from MBX server list that are target for decommission or you have to move OAB from the target MBX server to another MBX server, to do this you can use “QueryAllServers.xml” that can be found under “Exchange 2007 OAB Resource Manager” folder, this query allow you to find which MBX Server configured as OAB Server
    • Verify which Business Organization (customers) allocated (in MPS Resource Manager) for which Exchange Mail Store, to do this verification you need to run “QueryOrganizationByMailstore.xml” that can be found under “Exchange 2007 Resource Manager” folder, new simple table can be created as below to list all Mailbox Servers, mailstores, and the allocated Organization per each mailstore, this table will be used in coming step after move mailboxes to verify that MBX servers that are target for decommission are not allocated for any organization any more (The good point is that you may find that some mailstores are empty and not allocated for any organization so you can easily delete these mailstores as per coming steps), you may need to stop provisioning new organization or new mailboxes at this stage to avoid creating new mailboxes on the mailstores that are target for decommission.

    Mail Server

    Mailstore

    Organizations before Mailbox Move

    After Mailbox Move

    MBX01

    MBX01-DB01

    Org1.com
    Org2.com
    Org3.Net

     

    MBX01-DB02

    MBX02

    MBX02-DB01

     

    MBX02-DB02

    • Move Mailboxes from any mailstore in any of MBX server that is target for decommissioning, this mailboxes move should be done through MPS using PowerShell script, I used script described here as a base for the script I used as below after doing some tuning, and simply the script is read from CSV file the list of mailboxes that will be moved and call MPS to de-allocate resources for the moved mailboxes from original MBX mailstore and allocate it to the new MBX mailstore, and I remember here my college <Kip Ng> who help me fixing and tuning the script, the script I used is as below (You should note that there are some steps listed in the begging of the script and should be followed as a preparation steps before running the script), as a sample of generated CSV that script use is as follow:

    PrimarySMTPAddress,TargetDB
    Maged
    @Org1.net,MBXV01\MBXV01SG01\MBXV01SG01DB01
    Kip
    @Org2.com,MBXV01\MBXV01SG01\MBXV01SG01DB01

    And the used script is below:

    # 1. Use the Exchange Management Shell to get the source server name with Get-ExchangeServer | Select Name     
    # 2. Use the Exchange Management Shell to populate the input CSV file with Get-MailboxDatabase | where {$_.ServerName.Contains("sourceservername") -eq "true"} | Get-Mailbox | Select PrimarySMTPAddress,Database | Export-Csv C:\Temp\MbxsToBeMoved.csv –NoTypeInformation     
    # 3. Change ‘Database’ field header to ‘TargetDB’     
    # 4. Modify database/targetdb field entries as required in the CSV    
    # 5. Change preferredDomainController in mailbox move script    
    # 6. Run mailbox move script:    
    # CSV Example:    
    # PrimarySMTPAddress,TargetDB    
    # bloggsj,mytargetservername
    $path = "C:\MailboxMove\MbxsToBeMoved.csv";
    Write-Host;
    Write-Host "*******************";
    Write-Host "Move Mailbox Script" -Foregroundcolor Blue -Backgroundcolor White;
    Write-Host "*******************";
    Write-Host;
    Write-Host "A CSV is required (i.e. $path)"
    $Ver1 = Read-Host "CONTINUE script execution? [Y] to continue or [ANY OTHER KEY] to exit"
      if ($Ver1 -ne "Y")
      {exit;
      }
    Write-Host;
    Write-Host "Valid entries in CSV:" -Foregroundcolor Blue -Backgroundcolor White;
    Write-Host;
    Write-Host "PrimarySMTPAddress,TargetDB";
    Import-csv -path $path |
    foreach `
    {
                   $TDBs = Get-MailboxDatabase $_.TargetDB -ErrorVariable MyError -ErrorAction SilentlyContinue;
        $A = $_.PrimarySMTPAddress
                   Write-Host "$A,$TDBS";
    }
    If ($MyError -ne $null)`
    {
                   Write-Host;
        Write-Host "*******";
                   Write-Host "Error" -Foregroundcolor Red -Backgroundcolor White;
        Write-Host "*******";
        Write-Host "Invalid TargetDB in CSV. Script terminating..." -Foregroundcolor Blue -Backgroundcolor White;
        Write-Host "Error Description:" -Foregroundcolor Blue -Backgroundcolor White;
        $MyError;
        Write-Host;
                   exit;
    }
    $Ver2 = Read-Host "CONTINUE moving ALL mailboxes in CSV? [Y] to continue or [ANY OTHER KEY] to exit"
      if ($Ver2 -ne "Y")
      {exit;
      }
    Function SendMPSRequest([string]$xmlRequestStr)
    {
      $oMpf = new-object -comobject "Provisioning.ProvEngineClient"
      $xmlResponseStr = $oMPF.SubmitTrustedRequest($xmlRequest.get_InnerXml());
      $xmlResponse = new-object "System.Xml.XmlDocument";
      $xmlResponse.LoadXml($xmlResponseStr);
      $xmlResponse;
    }
    [string]$xmlRequestStr = @"
    <?xml version="1.0" encoding="utf-8"?>
    <request>
      <data>
        <preferredDomainController>ad01.HMC.Local</preferredDomainController>
        <user>CSVPopulated</user>
        <targetDatabase>CSVPopulated</targetDatabase>
      </data>
      <procedure>
        <execute namespace="Hosted Email 2007" procedure="MoveMailbox" impersonate="1">
          <before source="data" destination="executeData" mode="merge" />
          <after source="executeData" destination="data" mode="merge" />
        </execute>
      </procedure>
    </request>
    "@
    [string]$excXmlStr = @"
    <?xml version="1.0" encoding="utf-8"?>
    "@
    Write-Host
    Write-Host "Starting procedure..." -Foregroundcolor Blue -Backgroundcolor White;
    Write-Host
    $CSV = Import-csv -path $path
    Foreach ($line in $CSV)`
      {
        $mailbox = Get-Mailbox $line.PrimarySMTPAddress | Select PrimarySMTPAddress, DistinguishedName;
    Write-Host $line.PrimarySMTPAddress
    Write-Host $mailbox
        $userName = $mailbox.SameAccountName;
        $userDN = $mailbox.DistinguishedName;
        $TDB = $line.TargetDB
        Write-Host "Moving $userName to $TDB..." -ForegroundColor White
        Write-Host
        $xmlRequest = new-object "System.Xml.XmlDocument";
        $xmlRequest.LoadXml($xmlRequestStr); 
        $xmlRequest.request.data.user = "LDAP://" + $userDN;

    Write-Host $userDN;

        $xmlRequest.request.data.targetDatabase = $TDB;
        $xmlResponse = $null;
        $xmlResponse = SendMPSRequest($xmlRequestStr.ToString());
            if ($xmlResponse.Response.Data.User -ne $null)`
            {
                $MPSUser = New-Object System.Object;
                $MPSUser | Add-Member -Type NoteProperty -Name "DistinguishedName" -Value $userDN;
                $MPSUser | Add-Member -Type NoteProperty -Name "User" -Value $xmlResponse.Response.Data.user;
                $MPSUser | Add-Member -Type NoteProperty -Name "TargetDB" -Value $xmlResponse.Response.Data.targetDatabase;
                $MPSUser | FL;
            }
      }           
    Write-Host;
    Write-Host "********************************************************************************************************************************************************************************************";
    Write-Host "Script execution complete. In pre-HMC4.0 Hosted Exchange Update Rollup 5 environments, please remember to run the Managed Email 2007::RepairExchangeObject procedure on all mailboxes moved." -Foregroundcolor Blue -Backgroundcolor White;
    Write-Host "********************************************************************************************************************************************************************************************";
    Write-Host;

    • After successfully move all Mailboxes from target MBX Server/s to different MBX Server/s then you need to run step 3 again and complete the last column to be sure that mailstores in target MBX Servers are empty and not assigned for any organization.
    • Now you can remove the empty mailstores (after moving mailboxes and verifying that these mailstores are not allocated for any organization), this by running “RemoveExchangeResource.xml” under “Exchange Resource Manager” folder in MPS Engine Server.
    • Then you can run “QueryAllStore.xml” to verify that all mailstores in target MBX server/s were removed from MPS Resource Manager.
  • Downsizing HMC Environment to Prepare for Exchange 2010 SP2 Hosted Solution – Part1

    As most of Hosted Messaging and Collaboration (HMC) companies start planning to migrate to Exchange 2010 SP2 hosted environment due to the change in strategy that was announced about the future of /hosting mode here , so most HMC customer have to move...
  • Windows Server 2012 – Part3: Virtualization Enhancements “Mobility”– Hyper-V Replica

    In this post series I started here with a release date announced in Windows Server Blog (by the way it was announced yesterday (1st of August) that Windows Server 2012 is RTM today), then I start highlighting the main areas of enhancements that I will...
  • Windows Server 2012 – Part2: Virtualization Enhancements “Scalability & Flexibility”

    In this post series I started here http://blogs.technet.com/b/meamcs/archive/2012/07/10/windows-server-2012-part1-release-date.aspx with a release date announced in Windows Server Blog and highlighted the main areas of enhancements that I will focus on...
  • Windows Server 2012 – Part1: Release Date

    I was so excited when I read today that Windows Server 2012 Release Date (RTM version) is the first week of August 2012 and the product will be generally available to customers worldwide in September 2012 as clearly announced in Windows Server Blog here ...
  • Microsoft Private Cloud Videos

    These are a group of new Microsoft Private Cloud Videos: Video: Thought Leadership Series – Enabling Private Cloud Garth Fort talks about why you should consider converting your current datacenter infrastructure into a private cloud fabric.   Video...
  • Free Microsoft Private Cloud Training

    On February 21 & 22 Microsoft Learning is running a 2-day virtual training event to help the world learn about the upcoming enhancements with the Creating & Managing a Private Cloud with System Center 2012 Jump Start . It is 100% free and open...
  • Orchestrator 2012 Deployment & Configuration Step by Step – Part 5 “Integration Pack”

    In this post series I will go through Microsoft System Center Orchestrator 2012 Deployment and Configuration in Step by Step format with screenshots, and will go into details of the product to help you better understand how you can get benefits from this...
  • Orchestrator 2012 Deployment & Configuration Step by Step – Part 4 “Build, Testing and Monitoring a Runbook”

    In this post series I will go through Microsoft System Center Orchestrator 2012 Deployment and Configuration in Step by Step format with screenshots, and will go into details of the product to help you better understand how you can get benefits from this...
  • Orchestrator 2012 Deployment & Configuration Step by Step – Part 3 “Installation”

    In this post series I will go through Microsoft System Center Orchestrator 2012 Deployment and Configuration in Step by Step format with screenshots, and will go into details of the product to help you better understand how you can get benefits from this...
  • Orchestrator 2012 Deployment & Configuration Step by Step – Part 2 “System Requirements”

    In this post series I will go through Microsoft System Center Orchestrator 2012 Deployment and Configuration in Step by Step format with screenshots, and will go into details of the product to help you better understand how you can get benefits from this...
  • Orchestrator 2012 Deployment & Configuration Step by Step – Part 1 “Overview and Architecture”

    In this post series I will go through Microsoft System Center Orchestrator 2012 Deployment and Configuration in Step by Step format, and will go into details of the product to help you better understand how you can get benefits from this powerful product...
  • Operations Manager 2007 R2 Installation and Configuration (Step by Step) – Part 12 “Configure Audit Collection Service”

    this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing Root Management Server”, then...
  • Operations Manager 2007 R2 Installation and Configuration (Step by Step) – Part 11 “Configure Notification”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing...
  • Operations Manager 2007 R2 Installation and Configuration (Step by Step) – Part 10 “Discover Unix\Linux Servers and Deploy Agents”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing Root Management Server”...
  • Operations Manager 2007 R2 Installation and Configuration (Step by Step) – Part 9 “Discover Windows Computer and Deploy SCOM Agents”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing Root Management Server”...
  • Operations Manager 2007 R2 Installation and Configuration (Step by Step) – Part 8 “Download and Import Management Pack”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing...
  • Operations Manager 2007 R2 Installation and Configuration “Step by Step”–Part 7 “Installing Audit Collection Service”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing...
  • Operations Manager 2007 R2 Installation and Configuration “Step by Step”–Part 6 “Installing Data Warehouse Database”

    In this post series I went through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “ Installing...
  • What’s New in Configuration Manager 2012 “SCCM 2012”

    There is a very huge changes and enhancements from SCCM 2007 in Configuration Manager 2012, in this post series I will go through the main new changes and enhancements in System Center Configuration Manager 2012, I will start in this post with addressing...
  • Operations Manager 2007 R2 Installation and Configuration (step by step) – Part 5 “Configuring SQL Reporting Service”

    In this post services I am going through step by step into System Center Operations Manager 2007 R2 starting from “ Pre-Build ”, then I continued with “ Installing Operations Manager Database ”, followed by another post “...