Latest Entries »

I created Powershell backup script that iterates the Get-AXModel output and does backups.

Change variables at the top of the file to meet your configuration.

Click the “show source” below to see the code.


<#
backup of ax models.

Gary Holsopple
Vitamix...
gholsopple@vitamix.com

created 1.18.2012
changed to iterate xml 4/11/2012

#>

import-module "C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1"

#region functions
Function New-BackUpFolder($destinationFolder)
{
$dte = get-date
$dte = $dte.tostring() -replace "[:\s/]", "."
$backUpPath = "$destinationFolder" + $dte
$null = New-Item -path $backUpPath -itemType directory
return $backUpPath
} #end New-BackUpFolder

Function fBackup([string]$model, [string]$fileName, [string]$axEnv)
{
Export-AXModel -model $model -file $fileName -config $axEnv
}
#endregion

#region Variables
$axBackupFolder = "c:\axModelBackup\"
$backupFilePath = New-BackupFolder($axBackupFolder)
$devenv = "DynamicsAX12Development"

[System.Collections.ArrayList] $e = New-Object System.Collections.ArrayList
$e = @("Foundation";
"Foundation Labels";
"Foundation Upgrade";
"Update for Foundation Upgrade";
"Update for Foundation";
"SYP Labels";)

[System.Xml.XmlDocument] $xml
[System.Xml.XmlNode] $obj
[System.Xml.XmlNode] $property

#endregion

#region do the work

$xml = (Get-AXModel | convertto-xml )
$nodes = $xml.SelectNodes("Objects/Object")

foreach ($obj in $nodes)
{
foreach ($property in $obj.SelectNodes("Property"))
{
if ($property.GetAttribute("Name").Equals( "Name" ))
{
$nameToBackup = $property.InnerText
if ($e.contains($nameToBackup))
{
continue
}
$backupFileName = $backupFilePath + "\" + $nameToBackup + ".axmodel"
fBackup $nameToBackup $backupFileName $devenv
}
}
}
#endregion

Airgun that Aaron and I built together.

I followed a design from this post: http://ana-white.com/2011/01/where-did-the-shoes-go.html to make a very cool cabinet:

View full article »

sp_axwho that I use.

During the AXUG OHIO meeting, we talked about performance and things to look at when there are issues.

I mentioned that I use a stored procedure called: sp_axwho.

Read on to get the source:

View full article »

AXUG Presentation done on 2/18/2011.

For the AXUG Presentation on 2/18/2011, i went through the following presentation.

http://prezi.com/cbfqxydd2f_c/axug-ax2012/

The presentation was created using the PREZI.com presentation mechanism… Very cool. and fun too. !

as mentioned during the presentation, this is the stored procedure I use when someone calls and asks if there is some sort of performance issue currently happening.

https://holsopple.wordpress.com/2011/02/18/sp_axwho-that-i-use/

AX Centric blogs I read

Created a link to the AX centric blogs that I like.

See the links below or here.