Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-AzurRMDNSZone cmdlet not outputting correct results when using where-object #4203

Closed
animetauren opened this issue Jun 27, 2017 · 4 comments
Assignees
Labels
Network - DNS Service Attention This issue is responsible by Azure service team.

Comments

@animetauren
Copy link

animetauren commented Jun 27, 2017

Cmdlet(s)

Get-AzureRmDnsZone

PowerShell Version:

5.1.15063.413

Module Version

AzureRM.Dns v3.1.0

OS Version

10.0.15063.413

Description

If you have two DNS Zones with similar names i.e.(www.example.com and example.com) and you try to do a simple filter of DNS Zones using the where-object cmdlet, the expected result of returning the only one name is not achieved, instead you get both names, this is the case no matter which case you filter for, this can also be seen for the etag property of the DNSZone Object.

Script/Steps for Reproduction

Get-AzureRmDnsZone | Where-Object {$_.Name -eq "example.com"}

@cormacpayne
Copy link
Member

cormacpayne commented Jun 27, 2017

@animetauren Hey Henry, thanks for reporting this. We will have a PR out shortly that will fix this issue (just a matter of using the enumerateCollection parameter in this WriteObject call).

As a workaround until we get this fix in the next release next Friday, you can do

(Get-AzureRmDnsZone) | Where-Object { $_.Name -eq "example.com }

@animetauren
Copy link
Author

@cormacpayne Thanks for the quick update and that fix does the job!

@cormacpayne
Copy link
Member

@animetauren just opened PR #4213 to fix this issue

This will enable the scenario you originally mentioned:

Get-AzureRmDnsZone | Where-Object { $_.Name -eq "example.com" }

@cormacpayne
Copy link
Member

@animetauren Hey Henry, this has been fixed in version 4.2.0 of Azure PowerShell. Please let me know if you are still seeing this issue!

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network - DNS Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants