INTRODUCTION

IMPORTANT: This module is still a work in progress!

At my current job, we use OpenProvider as our main domain registrar and DNS provider.

I initially wrote this module for personal convenience, but I’ve also integrated some of the functions in our PowerShell Universal dashboards.

Lately, OpenProvider has had multiple DNS outages. This has forced us to migrate some of our bigger clients’ DNS-zones to Azure.

To automate this process, I added the Sync-OPDnsToAzure function.

I’ll showcase some of the included functions below. The full module can be found here: GitHub.

Get-OPBearerToken (Private)

At its current state, Openprovider’s API only supports Bearer Authentication which involves acquiring security tokens that are then passed in a request.

OpenProvider Bearer Tokens are valid for 24 hours. This function requests a new Bearer Token and saves it in a script variable. If the token is created less than 24 hours ago, the token will be reused.

PS > Get-OPBearerToken

Get-OPBearerToken

Get-OPTransferToken

Retrieves domain transfer key (EPP token) for one or multiple domains.

PS > Get-OPTransferToken -Domains 'tech-tom.com', 'liontech.nl'

Get-OPTransferToken

Sync-OPDnsToAzure

Copies DNS zone(s) from OpenProvider to Azure. Also creates DNS zone in Azure if it does not exist.

When the “-Migrate” parameter is used, you’ll be given the option to change the NameServers immediately after copying the zone as well.

PS > Sync-OPDnsToAzure -domain 'tech-tom.com'

Sync-OPDnsToAzure