问题
Unable to Import-module DnsClient
module in PowerShell core(PS6.2), I recently installed PowerShell 6.2 and trying to run Get-DnsClientServerAddress
.
Getting Error:
The term 'Get-DnsClientServerAddress' is not recognized as the name of cmdlet,function, script file.
I tried to resolve this by running the below command.
import-module DnsClient -SkipEditionCheck
But again getting the error:
Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=6.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
来源:https://stackoverflow.com/questions/59263965/unable-to-import-module-dnsclient-module-in-powershell-coreps6-2