Fix errors when trying to expand IPAddress #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this fix the following errors disappear:
$dnsAddressList = Resolve-DnsName -Name $fqdn -Server ($dnsServers | Select-Object -First 1) -Type A -DnsOnly | Select-Object -ExpandProperty IPAddress
Select-Object : Die IPAddress-Eigenschaft kann nicht gefunden werden.
In Zeile:1 Zeichen:113
Select-Object : Die IPAddress-Eigenschaft kann nicht gefunden werden.
In Zeile:1 Zeichen:113
This is because of this output:
Resolve-DnsName -Name $fqdn -Server ($dnsServers | Select-Object -First 1) -Type A -DnsOnly
Name Type TTL Section IPAddress
hostname.contoso.de A 1200 Answer 172.30.x.x
Name : contoso.de
QueryType : NS
TTL : 86400
Section : Authority
NameHost : dns.contoso.de
Name : contoso.de
QueryType : NS
TTL : 86400
Section : Authority
NameHost : dns2.contoso.de
dns.contoso.de A 86400 Additional 172.18.x.x
dns2.contoso.de A 3600 Additional 172.17.x.x