Set-DnsServerCache:無法連線到 DNS 伺服器

Set-DnsServerCache:無法連線到 DNS 伺服器

我正在嘗試更改電腦的 DNS 快取最大生存時間。

它不在任何網域中,我是電腦上的完全管理員 - 內建管理員帳戶+停用群組原則「在管理員批准模式下運行所有管理員」。

我安裝了 RSAT DNS 工具:

“Get-WindowsCapability -Name RSAT.dns* -online”結果

嘗試時Set-DnsServerCache -MaxTtl 2.00:00:00出現以下錯誤:

Set-DnsServerCache: Failed to connect to DNS server <computer name>. Please check if the server name is valid and is reachable.

我認為這可能是某種遠端處理問題,所以我也這樣做了:

$s = New-PSSession
Invoke-Command -command {Import-Module dnsserver} -Session $s
Import-PSSession -Session $s -Module dnsserver -Prefix RemoteDNS
Set-RemoteDNSDnsServerCache -MaxTtl 2.00:00:00

同樣的錯誤。
我在網上得到了 0 個該錯誤的結果。

相關內容