Why is Resolve-DnsName
not recognized for PowerShell Core
? So far as I recall it works fine with PowerShell
itself.
Is this a .NET
versus dotnet
problem? That dotnet
simply doesn't have this functionality?
thufir@dur:~/powershell/webservicex$
thufir@dur:~/powershell/webservicex$ dotnet --version
2.1.4
thufir@dur:~/powershell/webservicex$
thufir@dur:~/powershell/webservicex$ ./dns.ps1
Resolve-DnsName : The term 'Resolve-DnsName' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At /home/thufir/powershell/webservicex/dns.ps1:3 char:1
+ Resolve-DnsName -Name localhost -Type ANY | Format-Table -AutoSize
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Resolve-DnsName:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
thufir@dur:~/powershell/webservicex$
thufir@dur:~/powershell/webservicex$ cat dns.ps1
#!/usr/bin/pwsh -Command
Resolve-DnsName -Name localhost -Type ANY | Format-Table -AutoSize
thufir@dur:~/powershell/webservicex$