Sample Header Ad - 728x90

Resolve-DnsName : The term 'Resolve-DnsName' is not recognized as the name of a cmdlet

8 votes
3 answers
8256 views
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$ see closed question also , and technet .
Asked by Thufir (1970 rep)
Feb 18, 2018, 05:02 PM
Last activity: Jan 18, 2022, 04:28 PM