我运行的是Windows 7家庭高级版。我安装了.Net4.5.1和它成功安装的Powershell4.0。---- ----- ----- --------但是,我不能运行命令或脚本:
PS C:\Users\Aubrey\Documents> Get-NetAdapterGet-NetAdapter : The term 'Get-NetAdapter' is not recognized as the name o
在Linux中,我可以使用"ip route“命令确定活动的Eth适配器: vasyl@retail-z3-1:~$ ip route get 8.8.8.8
8.8.8.8 via 10.186.0.1dev ens4 src 1.1.1.1 有没有办法确定PS中哪个适配器名称(及其MAC)用于互联网连接?也许是get-netadapter或类似的东西。现在,我正在使用下面的代码从已知适配器中提取MAC地址: $CurrMac = get-netadapter | Where {$_.nam