3

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
4

2 に答える 2

5

http://blogs.technet.com/b/heyscriptingguy/archive/2014/01/15/using-powershell-to-find-connected-network-adapters.aspxによると、NetAdapter モジュール (したがって、Get-NetAdapterコマンド) には、Windows 8 以降が必要です。

于 2014-11-30T13:18:26.757 に答える