In the course of IAAS VM migrations from on-premises to Azure, the VM IP address changes. In Windows VM we typically invoke a command like
which is part of the DnsClient PowerShell module.
The Validate-NameResolution cmdlet part of the AZSBTools module, queries each DNS server in the current AD to make sure that all DCs in the current AD forest resolve a given computer name to the same IP. This helps to diagnose instances where DNS partition replication is not functioning properly, where some DC’s resolve a given computer name to the old on-premises IP while others resolve the same name to the new Azure IP.
This cmdlet takes one required parameter -ComputerName which accepts one or more computer names
Example: Validate-NameResolution -ComputerName ‘myTestPC’
The cmdlet outputs interim information to the console like:
In addition, it also returns PSCustom Objects, one for each resolved IP address with the following properties: ComputerName, ResolvesTo, and DNSServer similar to:
To download and install the latest version of AZSBTools from the PowerShell Gallery and its dependencies, type
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module AZSBTools,AzureRM -Force
AZSBTools contains functions that depend on AzureRM module, and they’re typically installed together.
To load the AZSBTools and AzureRM modules type:
Import-Module AZSBTools,AzureRM -DisableNameChecking
To view a list of cmdlets/functions in SB-Tools, type
Get-Command -Module AZSBTools
To view the built-in help of one of the AZSBTools functions/cmdlets, type
help <function/cmdlet name> -show
help New-SBAZServicePrincipal -show