.net Invoke-WebRequest cmdlet在哪个版本的PowerShell中可用?

.net Invoke-WebRequest cmdlet在哪个版本的PowerShell中可用?,.net,json,shell,web-services,powershell,.net,Json,Shell,Web Services,Powershell,要使用Invoke-WebRequest Cmdlet运行此脚本,我将其复制到一行(加上echo)脚本中,如下所示: thufir > thufir > thufir > $PSVersionTable Name Value ---- ----- CLRVersion 2.0.50727.8762 BuildVersion

要使用Invoke-WebRequest Cmdlet运行此脚本,我将其复制到一行(加上echo)脚本中,如下所示:

thufir >
thufir >
thufir > $PSVersionTable

Name                           Value
----                           -----
CLRVersion                     2.0.50727.8762
BuildVersion                   6.1.7601.17514
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1


thufir >
thufir > type .\json_request.ps1

"start"

(Invoke-WebRequest http://ipinfo.io/json | ConvertFrom-JSON).ip

"done"
thufir >
thufir > .\json_request.ps1
start
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At C:\Users\604-083234\Desktop\json_request.ps1:4 char:19
+ (Invoke-WebRequest <<<<  http://ipinfo.io/json | ConvertFrom-JSON).ip
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

done
thufir >
thufir>
thufir>
thufir>$pVersionTable
名称值
----                           -----
CLR版本2.0.50727.8762
构建版本6.1.7601.17514
PS2.0版
WSManStack2.0版
PSCompatibleVersions{1.0,2.0}
序列化版本1.1.0.1
PSRemotingProtocol2.1版
thufir>
thufir>类型。\json\u request.ps1
“开始”
(调用WebRequest)http://ipinfo.io/json |从JSON.ip转换
“完成”
thufir>
thufir>\json\u request.ps1
开始
术语“Invoke WebRequest”未被识别为cmdlet Function的名称
n、 脚本文件或可操作程序。检查姓名的拼写,或者如果是pa
已包含,请验证路径是否正确,然后重试。
在C:\Users\604-083234\Desktop\json\u request.ps1:4 char:19

+ (Invoke WebRequestInvoke WebRequest在PowerShell版本3中可用

Invoke WebRequest在PowerShell版本3中可用

它在v3中可用
Invoke WebRequest需要v3?仅供将来参考,当您在PowerShell中探索新的cmdlet时,官方MSDN文档页上有一个下拉菜单下面将显示包含cmdlet的powershell的最早版本。例如,下面是此cmdlet的链接:它需要v3+@EBGreen来为我解决问题。thx。以及,上面的链接需要thx。它在v3
Invoke WebRequest
requires v3?中提供,仅供将来探索新cmdlet时参考在powershell中,官方MSDN文档页面有一个下拉列表,显示包含cmdlet的powershell的最早版本。例如,这里是此cmdlet的链接:它需要v3+@EBGreen来解决me的问题。thx。以及,thx用于上面的链接。