Start or Stop All D365 F&O Services on a Dev VM with One PowerShell Script
Why you need one script to start and stop D365 F&O services If you develop on a Dynamics 365 Finance & Operations (D365 F&O) one-box dev VM, you start and stop the same services every week. This post gives you one PowerShell script that does it in a single command: pass 1 to start every D365 F&O service, or 0 (the default) to stop them all. You need to stop the D365 F&O services more often than you think: Before a database restore or refresh. Microsoft's own steps stop the AOSService app pool and the Batch Management Service before replacing AxDB ( Microsoft Learn ). Before deleting a model. Microsoft Learn says to stop the AOS and Batch services first, then run a full database sync after restarting ( Microsoft Learn ). When a build fails with locked DLLs in the PackagesLocalDirectory bin folder. To free RAM and CPU when you only need Visual Studio, or before shutting the VM down. The script covers IIS and the AOSService app pool (the AOS), DynamicsAx...