RSS

Tag Archives: script

Build and deploy scripts for Microsoft Dynamics AX 2012

For those who were looking for build and deploy scripts. At Tech Conference this year, Microsoft Build Team recommends to use this one

https://gallery.technet.microsoft.com/scriptcenter/Build-and-deploy-for-b166c6e4

clip_image001

Advertisements
 

Tags: , , , ,

Check Installed Models Script

I’m working in an environment with 3 different AOSs. I have to maintain many models and hotfixes. Therefore, I need to find a clever way to determine whether or not a specific hotfix was installed on an environment

Download

Use the attached script,  and then execute it in AX Management Shell and follow the prompts.

clip_image002

$found = $false
$server = read-host "Enter the database server that hosts your modelstore database (Default is localhost)"
if ($server -eq ''){ $server='localhost'}

$db = read-host "Enter the name of your AX model store database (Default is MicrosoftDynamicsAx)"
if ($db -eq ''){$db = 'MicrosoftDynamicsAx'}

$kb = read-host "Which KB are you attempting to install?"

while ($kb -eq '')
{
   $kb = read-host "You must enter a Kb to search for, try again (enter a KB now)" 
}

$models = Get-AxModel -server $server -database $db

foreach ($model in $models)
{
    $manifest = Get-AXModelManifest -Server $server -Database $db -model $model.Name 
    $details = $manifest.Details
    if (Select-String -Pattern $kb -InputObject $details)
    {
        $found = $true
        $manifest.Name
        $details
    }
}

if (!$found)
{    
    "KB " + $kb + " was not found in any installed model"
}
 
Leave a comment

Posted by on February 11, 2014 in Installation and Configuration

 

Tags: , , , , ,

 
%d bloggers like this: