gpt4 book ai didi

linux - Azure PowerShell : Is it possible to call bash commands from script written in ps1?

转载 作者:太空宇宙 更新时间:2023-11-04 12:49:35 25 4
gpt4 key购买 nike

我创建了 ps1 脚本,它创建了一个 Linux 虚拟机并打开了 ssh session 。我想问一下是否有可能以某种方式将 bash 命令写入此脚本中。我的意思是,如果我调用我的 script.ps1,它会创建我的虚拟机,打开 ssh session 并执行例如所有 apt-gets 等等。可能吗?

最佳答案

我不确定这是否可行。相反,我建议使用 command-line interface 来做到这一点这可以在 Bash 中启用。 CLI 在这里 - https://github.com/Azure/azure-xplat-cli

Windows 中的 Bash(如果您打算使用 Windows)is possible only in the latest Windows 10 builds ,所以你需要以某种方式整合这些可能性

关于linux - Azure PowerShell : Is it possible to call bash commands from script written in ps1?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37682210/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com