我正在运行Windows 7 Home Premium。
我安装了.Net4.5.1和Powershell 4.0
安装成功。我可以验证一下,因为此命令返回:

PS C:\Users\Aubrey\Documents> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

但是我不能运行命令或脚本:
PS C:\Users\Aubrey\Documents> Get-NetAdapter
Get-NetAdapter : The term 'Get-NetAdapter' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-NetAdapter
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-NetAdapter:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

最佳答案

根据http://blogs.technet.com/b/heyscriptingguy/archive/2014/01/15/using-powershell-to-find-connected-network-adapters.aspx的说明,NetAdapter模块(因此还有Get-NetAdapter命令)需要Windows 8或更高版本。

08-25 06:26