Alternatively, we can create a public IP address using Azure PowerShell. Again, this approach is better when we want to automate the process. Even a public IP address can exist on its own; it's usually created to be joined with other resources and to be used as an endpoint. When using PowerShell to create a resource, we can continue with the next step and join it with a resource in a single script.
Creating a new public IP address with PowerShell
Getting ready
Open the PowerShell console and make sure you are connected to your Azure subscription.