Resolve-DnsName: термин «Resolve-DnsName» не распознается как имя командлета

Использование GNU Parallel:

find ./ -type d | cut -c 3-12 | parallel -k 'echo {} `date -d @{}`'

Если вы можете принять \ t вместо пробела:

find ./ -type d | cut -c 3-12 | parallel -k --tag date -d @{}
3
18.02.2018, 19:02
2 ответа

De la documentación Novedades de PowerShell Core 6.0 , en la sección "Compatibilidad con versiones anteriores":

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.

Si bien Powershell Core es GA, todavía es un trabajo en progreso.

1
27.01.2020, 21:30

Чтобы заставить командлет Resolve-DnsNameработать в PS 6, вы должны сначала импортировать или установить его.

Вы можете сначала попробовать Install-Module -Name DnsClient. Он будет использовать ваш менеджер пакетов по умолчанию, чтобы вытащить его из psgallery и установить.

Затем, Import-Module -Name "DnsClient"чтобы втянуть его.

После этого Resolve-DnsNameкомандлет должен работать.

Вы также можете использовать различные параметры Test-NetConnectionдля разрешения в модуле NetTCPIP.

0
24.04.2020, 04:46

Теги

Похожие вопросы