I am developing in Azure Service Fabric and there are several times when the Service Fabric is not started for some reason (usually after a reboot). The Service Fabric Manager in the system tray has horrible response time (if it responds at all).
Is there a PowerShell cmdlet or even a cli command that I can use to start the local Service Fabric?
You can just use the Start-Service
cmdlet
PS C:\windows\system32> Start-Service FabricHostSvc
WARNING: Waiting for service 'Microsoft Service Fabric Host Service (FabricHostSvc)' to start...
You can also check if the host is running by running Get-Service
PS C:\windows\system32> Get-Service FabrichostSvc
Status Name DisplayName
------ ---- -----------
Running FabrichostSvc Microsoft Service Fabric Host Service
If it's running you can also use Restart-Service
PS C:\windows\system32> Restart-Service FabrichostSvc
WARNING: Waiting for service 'Microsoft Service Fabric Host Service (FabrichostSvc)' to start...
WARNING: Waiting for service 'Microsoft Service Fabric Host Service (FabrichostSvc)' to start...