It’s been a while since I used Powershell and so I am in a rush in relearning it for some projects. For one of them, I need to do a resolve-dns lookup for a list of subdomains.
Here is one of the approaches I went with:
$domains = Get-Content @(C:\Users\myself\Subdomains.txt)
$domains | Resolve-DnsName -Type ANY -Server 126.96.36.199
Any idea why this wouldn’t work and how I can fix this issue? I tried using a loop to go through the list but I kept on ending up with no errors but no files or output being generated.