![]() |
#1 |
Участник
|
Two tricks about stopping AX service via PowerShell
Источник: http://alexvoy.blogspot.com/2011/10/...x-service.html
============== Generally speaking, it is true for all Windows services but my particular example is about stopping Microsoft Dynamics AX service (AOS) via PowerShell. As recommended in Deploying customizations across Microsoft Dynamics AX environments white paper, before importing a metadata model store into the target environment, one must stop all AOS instances in it. First trick is on how to provide the correct name of the service supposed to be stopped. ![]() If you try to use the service name you see in Services, you will fail. PS C:\Windows\system> Set-Service -name AOS60$01 -status stoppedIt is evident that the problem is in $ sign. To fix it you can simply quoted it with "'" (not with "!). PS C:\Windows\system32> Set-Service -name 'AOS60$01' -status stoppedUnfortunately, this command does not work anyway because of an error: Set-Service : Cannot stop service 'Microsoft Dynamics AX Object Server 6.0$01-aNevertheless, you can stop the service as usual without any issue. I do not why it does not work but I would suggest that one use another commands to stop and start the service, namely: PS C:\Windows\system32> Stop-Service 'AOS60$01' PS C:\Windows\system32> Start-Service 'AOS60$01'It takes its time, be patient! Источник: http://alexvoy.blogspot.com/2011/10/...x-service.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
Теги |
powershell |
|
|