This script is deprecated as you can use Network Security Group (NSG) service tags to control outbound connectivity required for ASR replication. You can refer to the below document for details.

 

https://docs.microsoft.com/azure/site-recovery/azure-to-azure-about-networking#outbound-connectivity-for-ip-address-ranges