< Back

Get-AxService

Sat Jan 11, 2020 8:13 am

NAME Get-AxService



SYNOPSIS

Get the status of the AX 2012 service(s)





SYNTAX

Get-AxService [-ComputerName <String[]>] [-All] [-AosInstanceName <String>] [-ScanAllAosServices]

[<CommonParameters>]



Get-AxService [-ComputerName <String[]>] [-AosInstanceName <String>] [-Aos] [-ManagementReporter] [-DIXF]

[-ScanAllAosServices] [<CommonParameters>]





DESCRIPTION

Get the status of AX 2012 service(s) on the computer





PARAMETERS

-ComputerName <String[]>

Name of the computer(s) that you want to work against



Required? false

Position? named

Default value $Script:ActiveAosComputername

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-All [<SwitchParameter>]

Instruct the cmdlet to include all known AX 2012 services



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-AosInstanceName <String>

Name of the AOS instance that you are looking for



Accepts wildcards for searching. E.g. -AosInstanceName "*DEV*"



If AxActiveAosConfiguration has been configured, the default value is the name of the instance registered



Default value is otherwise "*" which will search for all AOS instances



Required? false

Position? named

Default value $(if (-not ([System.String]::IsNullOrEmpty($Script:ActiveAosInstancename))) {

"*$Script:ActiveAosInstancename" } else { "*" })

Accept pipeline input? false

Accept wildcard characters? false



-Aos [<SwitchParameter>]

Instruct the cmdlet to include the AOS service



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ManagementReporter [<SwitchParameter>]

Instruct the cmdlet to include the ManagementReporter service



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DIXF [<SwitchParameter>]

Instruct the cmdlet to include the DIXF service



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ScanAllAosServices [<SwitchParameter>]

Instruct the cmdlet to look for all available AOS Instances on the computer



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author: M??????tz Jensen (@Splaxi)



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-AxService



This will get the status for all the default services from the local computer.

If AxActiveAosConfiguration has been configured, it will work against the ComputerName and AosInstanceName

registered.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-AxService -ScanAllAosServices



This will scan for all available AOS Services.

If AxActiveAosConfiguration has been configured, it will work against the ComputerName registered otherwise

localhost is used.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-AxService -ComputerName TEST-AOS-01 -Aos



This will get all AOS instances (services) from the server named "TEST-AOS-01".

If AxActiveAosConfiguration has been configured, it will work against the AosInstanceName registered otherwise it

will find all.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-AxService -ComputerName TEST-AOS-01 -Aos -AosInstanceName *DEV*



This will get all AOS instances (services) that match the search pattern "*DEV*" from the server named

"TEST-AOS-01".









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-AxService -ComputerName TEST-AOS-01 -Aos | Start-AxService -ShowOriginalProgress



This will scan the "TEST-AOS-01" server for all AOS instances (services) and start them.

It will show the status for the service(s) on the server afterwards.



If AxActiveAosConfiguration has been configured, it will work against the AosInstanceName registered otherwise it

will find all.









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Get-AxService -ComputerName TEST-AOS-01 -Aos | Stop-AxService -ShowOriginalProgress



This will scan the "TEST-AOS-01" server for all AOS instances (services) and stop them.

It will show the status for the service(s) on the server afterwards.



If AxActiveAosConfiguration has been configured, it will work against the AosInstanceName registered otherwise it

will find all.











RELATED LINKS