Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

Find which Hot-Fixes (KBs) you have installed in Microsoft Dynamics AX


Within Update 2 of Microsoft Dynamics AX, it is now possible to check which hot-fixes are installed. From Visual Studio, under the Dynamics AX menu, select Addins > Apply Hotfix. Then in the Apply Hotfix form, select the View Installed Hotfixes tab.

However, in RTW and Update 1 it was not so straight forward to determine the hot-fixes (KBs) you have installed. So, I have created the following PowerShell script to list the fixes you have in your packages folder. Please provide me with feedback on improvement suggestions or if you find any issues with the script.

#
# This source code is freeware and is provided on an "as is" basis without warranties of any kind, 
# whether express or implied, including without limitation warranties that the code is free of defect, 
# fit for a particular purpose or non-infringing.  The entire risk as to the quality and performance of 
# the code is with the end user.
# 
$packageDirectory = "C:\AOSService\PackagesLocalDirectory";
foreach($file in Get-ChildItem $packageDirectory)
{
    $folderPath = $packageDirectory + "\" + $file;
    foreach($file in Get-ChildItem $folderPath)
    {    
        $subFolder1 = $folderPath + "\" + $file;
        if ( Test-Path $subFolder1 -PathType Container )
        { 
            foreach($file in Get-ChildItem $subFolder1)
         {
             $subFolder2 = $file;
          $subFolder2Path = $subFolder1 + "\" + $file;
                if($subFolder2 -like "AXUpdate")
                {
              $booleanOutputFolder = $true;
                    foreach($file in Get-ChildItem $subFolder2Path\*.XML)
              {
                        if($booleanOutputFolder -eq $true)
                        {
                            $booleanOutputFolder = $false;
                            Write-Host "Fixes for folder:"$subFolder1;
                        }
                        $xml = (Get-Content $file);
                        Write-Host "Found KB:"$xml.AxUpdate.KBNumbers.string "     Package #:" $xml.AxUpdate.Name;
                  }
                    if($booleanOutputFolder -eq $false)
                    {
                        Write-Host "";
                    }
                }
         }
        }
    }
}
Read-Host -Prompt "Finished: Press Enter to continue" 

 

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.