腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
Powershell
invoke-
powershell
2.0
的
webrequest
powershell
我在
Powershell
5.0中创建了一个脚本,用于检索网站中
的
数据并将其放入文件中。下面的代码可以在Windows7或更高版本上运行,因为它们都有.net Framework5.0。现在我被告知我需要在更低版本
的
windows操作系统上运行,比如XP。XP中
的
powershells是
2.0
版本,而微软已经终止了对XP
的
支持。我需要一个
powershell
2.0
代码,它
的
行为与我在5.0中编写
的
代码相同: $num
浏览 15
提问于2017-01-11
得票数 0
2
回答
不能同时使用Invoke-SqlCmd和Invoke-RestMethod创建
Powershell
脚本?
rest
、
powershell
、
powershell-2.0
、
powershell-3.0
、
sqlcmd
Powershell
v3添加了Invoke-
WebRequest
和
Invoke-
version,但我无法让Invoke-SqlCmd从该版本中工作。如果我回到
Powershell
v2,我可以调用-SqlCmd,但是现在Invoke-
WebRequest
和Invoke-RestMethod不再可用。我可以“调用-表达式sqlcmd”或“&sqlcmd”,但我认为必须手动将输出(这只是一个字符串)封送到对PS更客观
的
输出。 是否有任何方法可以同时拥有所有这些方法,最好是来自PS
浏览 2
提问于2013-11-01
得票数 0
回答已采纳
1
回答
PowerShell
-使用Invoke-RestMethod上载文件时如何指定ContentType
powershell
在
powershell
7中使用Invoke-
WebRequest
或
Invoke-
posted方法,如何设置表单数据中文件发布
的
ContentType?我遇到
的
问题是接收应用程序可以看到预期
的
字段和文件,但是文件
的
ContentType是application /octet,而不是application/zip。path to .zip file"Invoke-RestMethod -Method POST -Uri $ur
浏览 6
提问于2021-12-31
得票数 0
2
回答
如何从操作系统命令行启动
PowerShell
脚本?
windows
、
command-line
、
powershell
我有一个用于构建项目文件
的
PowerShell
脚本,我希望能够从文件管理器
的
命令行运行它(并且,可能的话,创建一个指向该脚本
的
快捷方式,以便可以从我
的
桌面启动构建) 有办法做到这一点吗?
浏览 0
提问于2010-07-24
得票数 22
回答已采纳
1
回答
如何在
Powershell
2.0
上使用POST方法传递JSON参数?
powershell
我有一个
Powershell
代码,它在
powershell
版本3中工作得非常好。 我也需要在
Powershell
2.0
中运行此代码。但PS
2.0
版不支持Invoke-
WebRequest
。$params = "metrics[]=failed:count" $failed = (Invoke-
WebRequest
-Uri http://localhost:9000/stats -Method
浏览 41
提问于2019-04-30
得票数 0
回答已采纳
2
回答
Invoke-
PowerShell
版本2
的
WebRequest
powershell
、
windows-server-2003
与
PowerShell
版本2中
的
Invoke-
WebRequest
函数等效
的
是什么。这就是我正在尝试对我
的
函数执行
的
操作,因为我无法升级到
PowerShell
4,因为我使用
的
是Windows Server2003。Invoke-
WebRequest
$uri -Body ($baseMessage | ConvertTo-Json -Compress) -Method Post -ContentType "applicat
浏览 5
提问于2015-04-25
得票数 0
1
回答
powershell
invoke-
登录网站
的
webrequest
forms
、
powershell
、
web
、
login
我使用invoke-
webrequest
登录网站已经取得了很多成功,但我被难住了。我正在尝试登录https:// ctslink.com或https:// direct.ctslink.com。登录表单有一个隐藏
的
令牌字段,每次我尝试登录时它都会更改,我相信这是导致问题
的
原因。我注意到
的
另一件事是,在第一次调用invoke-
webrequest
之后,会话变量$fb为空。 $r=Invoke-
WebRequest
www.ctslink.com -
浏览 0
提问于2014-08-16
得票数 9
2
回答
运行包含"/“参数
的
系统命令
的
PowerShell
powershell
我正在尝试运行一个简单
的
系统命令:dir c:\Temp /ar,它使用"&“、
Invoke-
表达式、
Invoke-
命令从
PowerShell
脚本中运行,但看起来
PowerShell
并不真正喜欢正斜杠"
浏览 4
提问于2022-01-17
得票数 0
2
回答
如何发送带有-d参数
的
curl更新请求?
powershell
、
curl
、
box-api
我需要从
powershell
发送一个curl请求,使用寻求帮助(我正在查找名为Update User
的
部分,但我遇到了一些问题:应该更新用户名,但我得到: Invoke-
WebRequ
浏览 12
提问于2018-01-29
得票数 1
回答已采纳
3
回答
在远程计算机上运行调用命令时出现OutOfMemory错误
powershell
、
memory
、
memory-management
、
memory-leaks
、
out-of-memory
-Encoding ascii } -Credential $creds 在运行完30台机器之后,
PowerShell
和运行脚本
的
机器就会耗尽内存。shell将消耗正在运行
的
机器上所有16 GB
的
内存。像超出外壳内存这样
的
解决方案可能无法工作,例如
浏览 0
提问于2018-01-10
得票数 2
1
回答
使用
Powershell
和VisualStudio2019查询TFS 2015源代码库
powershell
、
tfs-2015
、
visual-studio-2019
我正在尝试用VisualStudio2019创建一个
Powershell
脚本,该脚本访问一个特定
的
2015团队项目及其分支。目标是返回在特定时间段内创建或修改
的
文件
的
名称。要做到这一点,我
的
印象是,我必须筛选.CreationTime和.LastWriteTime属性。API成功地访问了项目集合,但是在使用版本控制存储库实例化Microsoft.TeamFoundation.Client时未能访问单个
的
团队项目。已经确保了身份验证,但没有vcs方法识别存储库路径。
浏览 0
提问于2019-08-20
得票数 2
回答已采纳
10
回答
PowerShell
脚本以检查URL
的
状态
powershell
、
web-services
、
powershell-2.0
、
monitoring
我在互联网上找到了同样
的
PowerShell
脚本。Invoke-
WebRequest
-Uri https://stackoverflow.com/questions/20259251/
powershell
-script-to-check-the-status-of-a-url输出 PS C:\Users\682126> Invoke-
WebRequest
-Uri https://stackoverflow.com/q
浏览 12
提问于2013-11-28
得票数 34
回答已采纳
1
回答
PowerShell
Invoke-
使用链接
的
WebRequest
问题
powershell
、
invoke-webrequest
我正在尝试创建一个脚本,该脚本将解析特定exe下载链接
的
URL并将其下载。我之所以这样做,是因为下载链接经常更改。gid=sep14"Where-Object{$_.InnerText -like "*core15sdsv5i64Select-Object -ExpandProperty href$start_time = Get
浏览 18
提问于2020-03-10
得票数 0
1
回答
在调用VSTS API中传递个人访问令牌
powershell
、
azure-devops
、
powershell-2.0
、
azure-devops-rest-api
我正在使用
powershell
调用VSTS来查询构建包
的
一些json data。我没有使用Invoke-RestMethod访问API
的
问题,但是对于具有
powershell
2.0
的
系统,这个cmdlet是不可用
的
,而且我们没有被授权安装任何更高版本
的
$
WebRequest
=[System.Net.
WebRequest
],因此我使用$
WebRequest
= [System.Net.
We
浏览 1
提问于2018-05-21
得票数 0
回答已采纳
1
回答
使用x.509证书下载带有
powershell
的
网页
powershell
、
ssl
、
webclient
、
x509certificate
、
webrequest
我在Windows10上尝试从使用X.509证书对客户端进行身份验证
的
站点下载一个文件时遇到了问题。我在IE
的
证书存储中安装了这个证书,我还导出了PFX文件。At P:\PSScripts\DownloadSslHtml.ps1:20 char:1+ CategoryInfo : InvalidOperation: (System.Net.
浏览 2
提问于2020-01-23
得票数 0
1
回答
PowerShell
Invoke-
Go Daddy
的
WebRequest
错误
api
、
powershell
、
godaddy-api
按照许多人建议
的
脚本(from here)运行正常,我遇到了一个我无法理解
的
错误。我是Power Shell
的
新手到中级,并且刚刚开始使用API。domain/records/A/$name -method put -headers $headers -Body $json -ContentType "application/json" } 最终
的
Invoke-
WebRequest
返回如下错误: Invoke-
WebRequest</e
浏览 16
提问于2019-04-06
得票数 1
回答已采纳
1
回答
调用-
WebRequest
cmdlet在什么版本
的
PowerShell
中可用?
.net
、
json
、
shell
、
web-services
、
powershell
要运行使用Invoke-
WebRequest
Cmdlet
的
,我将其复制到一行(加上回显)脚本中,如下所示:thufir >BuildVersion 6.1.7601.17514PSCompatibleVersions
浏览 0
提问于2018-03-29
得票数 0
回答已采纳
1
回答
PowerShell
2.0
的
PowerShell
Web请求帖子
post
、
powershell-2.0
如何在Windows 7上修改
PowerShell
2.0
版本
的
代码片段?$path = "myfolder/file.txt"Invoke-
WebRequest
-Uri "http//mywebsite" -Method POST -Body $body` 我试过了,但无法在
PowerShell
2.0</
浏览 15
提问于2019-02-10
得票数 0
回答已采纳
1
回答
无法使用
PowerShell
通过API发送请求
.net
、
api
、
powershell
我们有一个函数,它可以帮助回发到调用时运行
的
应用程序。当客户端运行
PowerShell
v3.0或更高版本时,这是完美的,但是我们有一个混合产业,而且目前还没有升级
PowerShell
的
可行性。我已经看到您可以使用.NET以同样
的
方式发布xml,但是我无法让它工作。Empty guid means db call failed #Used for
PowerShell
ver
浏览 1
提问于2017-11-09
得票数 0
回答已采纳
2
回答
调用-
WebRequest
不被识别为cmdlet 7
Powershell
的
名称
powershell
、
windows-7-x64
、
invoke-webrequest
如何在Windows7
PowerShell
上使用此脚本?$IE = new-object -com internetexplorer.application$IE.visible=$true$word=$go = (Invoke-
WebRequest
–Uri ‘c:\word.html("$word2").item(0).click() 运
浏览 1
提问于2018-10-28
得票数 3
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
PowerShell系列(一):PowerShell介绍和cmd命令行的区别
PowerShell类型的静态方法
vRO和PowerShell主机的关联
PowerShell之管道脚本的创建
PowerShell与cmd的不同之处
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券