curl http://url/script.ps1 | powershell可能吗?
发布时间:2020-12-30 16:32:45 所属栏目:Linux 来源:互联网
导读:我只想复制我在 Linux系统上执行的相同操作 c: {CURL_EQUIVALENT_ON_WINDOWS} - http://url/script | powershell 那可能吗? 基本上我想执行从服务器下载的流. IE:步骤: 1)了解如何在PowerShell中执行流. 执行一个流(我已在文件系统上拥有) c: type script.
|
我只想复制我在 Linux系统上执行的相同操作 c:> {CURL_EQUIVALENT_ON_WINDOWS} - http://url/script | powershell
那可能吗? 基本上我想执行从服务器下载的流. IE:步骤: 1)了解如何在PowerShell中执行流. c:> type script.ps1 | powershell -command - 但这不起作用. 有一个选项-File来执行“文件”,基本上我想尽可能执行流. 2)了解如何执行我从服务器下载并将其传输到PowerShell的流. 解决方法您可以使用连字符指定powershell的命令参数,以使其从标准输入读取其命令.以下是一个例子:"Write-Host This is a test" | powershell -command - 使用脚本文件内容的示例: Get-Content .test.ps1 | powershell -command - 从powershell帮助菜单: powershell /?
If the value of Command is "-",the command text is read from standard input. (编辑:吉安站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- tmux同步一些但不是所有的窗格
- Swift on Linux – 导入第三方模块
- linux – ssh multi-hop上的“bash:nc:command not found
- linux – “biosdevname”如何真正起作用?
- Linux上的C / Assembly IDE
- linux – 获取Xorg内部活动客户端的完整列表
- linux-kernel – Linux:使用U-Boot和Flat Image Tree(FIT)
- linux – 有没有办法刷新正在运行的进程的stdout
- linux-kernel – 有人可以帮我替换块设备驱动程序上的“loc
- linux – GCC详细模式输出说明
