List AOS services with colors

Here I have a little Powershell script, written mainly for demonstration purposes, nevertheless it does its job and may be useful to somebody. It connects to any number of servers, finds Dynamics AX AOS services there and shows them in green or red, depending on whether they’re running or not. $listOfComputers = ‘Server1′,’Server2’   $listOfComputers …

Continue reading ‘List AOS services with colors’ »

Show-Object

Show-Object is absolutely awesome PowerShell cmdlet – exactly what I missed! See how I call Get-Process and pipe the result to Show-Object. It opens a new Window where I can see all properties and expand object hierarchy; it also shows all methods, events and other members in the bottom part. This is not included in …

Continue reading ‘Show-Object’ »

AX management shell – multiple models

Even if you’re not familiar with PowerShell, you probably don’t have much trouble with using AX management cmdlets. You just call the right command, set some parameters and it’s done. # Just for example Export-AXModel -Model "MyModel" -File "c:\my.axmodel" If you don’t know the parameters, you’ll simply use Get-Help or some of its aliases, such …

Continue reading ‘AX management shell – multiple models’ »

Test Data Transfer Tool: Getting errors from log

I imported data to AX with the Test Data Transfer Tool and it told me that some errors occured. The log file is quite large, so I asked myself what’s the easiest way to find these errors. This is my approach, using a very simple Powershell script: [xml]$dplog = Get-Content C:\Windows\System32\dplog.xml $dplog.root.item | ? Status …

Continue reading ‘Test Data Transfer Tool: Getting errors from log’ »

Creating AX users in Powershell

If you want to create a user in Dynamics AX 2012, you can simply use New-AXUser cmdlet and other User and role-based security cmdlets. It’s more difficult in AX 2009 and older versions, but you can utilize Business Connector to do the job. Below is an extended function that I wrote for AX 2009. It accepts …

Continue reading ‘Creating AX users in Powershell’ »