[System.Net.Dns]::GetHostAddresses($ServerName)
Get the IP address based on the host name
PS C:\> $ServerName = 'DC01' >> [System.Net.Dns]::GetHostAddresses($ServerName) Address : 167840266 AddressFamily : InterNetwork ScopeId : IsIPv6Multicast : False IsIPv6LinkLocal : False IsIPv6SiteLocal : False IsIPv6Teredo : False IsIPv4MappedToIPv6 : False IPAddressToString : 10.10.1.10