Resolve-DnsName: o termo 'Resolve-DnsName' não é reconhecido como o nome de um cmdlet

3

Por que Resolve-DnsName não é reconhecido por PowerShell Core ? Tanto quanto me lembro, funciona bem com PowerShell em si.

Este é um problema .NET versus dotnet ? Que dotnet simplesmente não tem essa funcionalidade?

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$ 

veja a pergunta fechada também e technet .

    
por Thufir 18.02.2018 / 18:02

1 resposta

1

Do O que há de novo na documentação do PowerShell Core 6.0 , na seção" Compatibilidade retroativa ":

Most of the modules that ship as part of Windows (for example, DnsClient, Hyper-V, NetTCPIP, Storage, etc.) and other Microsoft products including Azure and Office have not been explicitly ported to .NET Core yet. The PowerShell team is working with these product groups and teams to validate and port their existing modules to PowerShell Core. With .NET Standard and CDXML, many of these traditional Windows PowerShell modules do seem to work in PowerShell Core, but they have not been formally validated, and they are not formally supported.

Enquanto o Powershell Core é o GA, ainda é um trabalho em andamento.

    
por 19.02.2018 / 22:44