问题
I want to use an azure automation account to connect to a service fabric cluster and run a health check. I'm struggling with establishing a connection to the cluster because the service fabric sdk is not present.
Is there a way to use the service fabric powershell cmdlets in an azure automation runbook?
回答1:
You could import AzureRM.ServiceFabric 0.2.4
module to Azure automation account. Open the link https://www.powershellgallery.com/packages/AzureRM.ServiceFabric/0.2.4 and click Deploy to Azure Automation
. Then, you could use some Service Fabric PowerShell cmdlets.
Another solution is using Hybrid Runbook Worker.
The Hybrid Runbook Worker feature of Azure Automation allows you to run runbooks directly on the computer hosting the role and against resources in the environment to manage those local resources.
You could install fabric cluster SDK on your local, and use Runbook worker to execute it.
来源:https://stackoverflow.com/questions/45883580/how-to-use-service-fabric-powershell-cmdlets-in-an-azure-automation-runbook