我试过这个,
Get-CimInstance Win32_NetworkAdapterConfiguration -ComputerName $computerName | Where-Object { $_.AddressFamily -eq 'IPv6' }
还有这个,
Get-NetIPAddress -ComputerName $computerName | Where-Object {$_.AddressFamily -eq 'IPV6'}
但似乎没有什么对我有用 Get-CimInstance 正确获取 IPV6 地址。我只是得到与参数相关的错误。