web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Goshoom. NET Dev Blog / List AOS services with colors

List AOS services with colors

Martin Dráb Profile Picture Martin Dráb 239,040 Most Valuable Professional

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 `
    | % {gsv aos* -comp $_ `
        | % {Write-Host $_.DisplayName -f @('Green', 'Red')[$_.Status -ne 'Running']}}

Output:

AOS service colors

Hail Powershell!


This was originally posted here.

Comments

*This post is locked for comments