Azure / Azure-Network-Security

Resources for improving Customer Experience with Azure Network Security

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In Get-DanglingDnsRecords.ps1

juanjosv opened this issue · comments

Only with parameter inputfilednsrecord and a csv file, get this error:

Search-AzGraph : No subscriptions were found to run query. Please try to add them implicitly as param to your request (e.g. Search-AzGraph -Query '' -Subscription
'11111111-1111-1111-1111-111111111111')

The file has the correct columns, CNAME and FQDN.

I got that same error when trying to execute like the sample shows:

.\Get-DanglingDnsRecords.ps1 -FetchDnsRecordsFromAzureSubscription -InputSubscriptionIdRegexFilter 533 -InputDnsZoneNameRegexFilter testdnszone-1.a

PS: it seems Microsoft send an e-mail by mistake about us having dangling dns, so gonna quit more attempts into getting this working ;)

@rfcdejong, it's true the Dangling Subdomain message that went out to more recipients than intended.

@juanjosv, just so we can repro your scenario, can you please share both the command line you used as well as your sample file? That would help our engineers understand exactly what happened. Thank you!

The command was just:
Get-DanglingDnsRecords.ps1 -InputFileDnsRecords .\mydomainscname.csv,
through a powershell running as administrator.

The sample file contains two columns: CNAME,FQDN. Sorry but i cannot share the csv just by confidentiality.

We receive the same email @rfcdejong, so i got this url searching about the same problem.

@juanjosv can you please let us know the output of the below commands

  1. Search-AzGraph -query "resources | where subscriptionId matches regex '(?i)' |count"
  2. Search-AzGraph -query "resources | count"

Well, later i can find that we don't have any subscription, and microsoft send us an email saying the email sent before was an error. So sorry and by my side the issue can be closed.