Exchange 2010 Sp1 Rollup update and check for successful update

Exchange 2010 Automation Tip 1

If you are upgraded to Exchange 2010 Sp1 am sure you would be aware that there is also a Rollup 1 release and it needs to upgrade on all the exchange servers in the org. I will be showing you the simple silent automation steps which you can use to install rollups and immediately check if the rollup has been updated successfully.

In the below script I have kept the rollup file (. msp) at C:\Rollups. Whenever you try to install .exe or .msp file you will get an open folder security warning. When you wanted to do a silent install you don’t want the security warning to be displayed which will halt the installation until you click on open button to continue the installation. For this purpose I am adding .msp as risk file into the registry. This will help not to prompt for the file security warning. Next is the actually installation of rollup in silent mode and norestart. Start-process will kick the installation and with –wait parameter in the script will wait the script until the execution completes and then we will be verifying the registry for the successful installation and it finds one then it will display the same else the script will display the failed message

 


Function ExchangeRollupInstall()
{
$rollup ="C:\Rollups\Exchange2010-KB2407028-x64-en.msp"
$Lowriskregpath ="HKCU:\Software\Microsoft\Windows\Currentversion\Policies\Associations"
$Lowriskregfile = "LowRiskFileTypes"
$LowRiskFileTypes = ".msp"
$rollupcheckregpath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
$currentrollup = "Update Rollup 1 for Exchange Server 2010 Service Pack 1 (KB2407028)"

New-Item -Path $Lowriskregpath  -erroraction silentlycontinue |out-null
New-ItemProperty $Lowriskregpath -name $Lowriskregfile -value $LowRiskFileTypes -propertyType String -erroraction silentlycontinue |out-null

Start-Process $rollup -ArgumentList "/quiet /norestart" -Wait

$Keys = Get-ChildItem $rollupcheckregpath
$Items = $keys |foreach-object {Get-ItemProperty $_.PsPath}
foreach ($item in $items)
    {
 if($item.Displayname -like $currentrollup)
  {
  Write-host -f green "Exchange 2010 Sp1 Rollup has been upgraded successfully"
        Exit
  }
 }
 Write-host -f Red "Exchange 2010 Sp1 Rollup has been Failed"
}
ExchangeRollupInstall

 

You can also find the copy of the script from this link

I hope this helps.

One thought on “Exchange 2010 Sp1 Rollup update and check for successful update

  1. Pingback: Web Design CA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s