You need to download and install the module for azure DNS first
First check the power shell version because Azure RM module need power shell 5.0 at least.
$PSVersionTable.PSVersion
Install-Module -Name AzureRM
By default, the PowerShell gallery isn’t configured as a trusted repository for PowerShellGet. The first time you use the PSGallery you see the following prompt:
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its Installation Policy value by running the
Set-PSRepository cmdlet.
Are you sure you want to install the modules from ‘PSGallery’?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”):
# Import the module into the PowerShell session
Import-Module AzureRM
# Connect to Azure with an interactive dialog for sign-in
Connect-AzureRmAccount
Update-Module -Name AzureRM