< Back

Stop-AxService

Sat Jan 11, 2020 8:21 am

NAME Stop-AxService



SYNOPSIS

Stop AX 2012 service(s)





SYNTAX

Stop-AxService [[-Server] <String[]>] [-DisplayName] <String> [-ShowOriginalProgress] [-Force] [<CommonParameters>]



Stop-AxService [-Server <String[]>] [-Name <String[]>] [-ShowOriginalProgress] [-Force] [<CommonParameters>]





DESCRIPTION

Stop AX 2012 service(s) on the computer





PARAMETERS

-Server <String[]>

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



Default value is the name from the ComputerName from AxActiveAosConfiguration



Required? false

Position? 2

Default value $Script:ActiveAosComputername

Accept pipeline input? false

Accept wildcard characters? false



-DisplayName <String>

DisplayName of windows service that you want to work against



Accepts wildcards for searching. E.g. -DisplayName "*ax*obj*"



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String[]>

Name of the Windows Service that you want to work against



This parameter is used when piping in the details



Designed to work together with the Get-AxEnvironment cmdlet



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-ShowOriginalProgress [<SwitchParameter>]

Instruct the cmdlet to output the status for the service



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

Instruct the cmdlet to force the stopping of the service



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:\\>Stop-AxService -Server TEST-AOS-01 -DisplayName *ax*obj*



This will stop the service(s) that match the search pattern "*ax*obj*" on the server named "TEST-AOS-01".









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



PS C:\\>Stop-AxService -Server TEST-AOS-01 -DisplayName *ax*obj* -ShowOriginalProgress



This will stop the service(s) that match the search pattern "*ax*obj*" on the server named "TEST-AOS-01".

It will show the progress of stopping the service(s) in the console.

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









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



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



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

It will show the progress of stopping the service(s) in the console.

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











RELATED LINKS