Azure Site Recovery: Site to Azure with Static IPs

I could use some help understanding the Azure Automated runbook and how to use it with Azure Site Recovery.

This article suggests if my VMs have static IPs and I want to failover to Azure I need to use the code in the article as part of the runbook to set a new IP.

What I don’t understand from the code is where do I get my AzureConnectionName and how do I call the runbook as part of failing over a VM?

Can anyone help? Is there a better or different way?