我首先编写了powershell脚本,这给了我提供服务运行的节点及其状态。脚本使用Get-集群资源命令,然后我编写了python脚本,它正在执行这个powershell。当我运行powershell脚本时,我将得到节点及其状态。但是,当我从python整理powershell脚本时,我得到的错误是:
Get-ClusterResource : The term 'Get-ClusterResource' is no
我正在Azure DevOps中创建一个构建管道。我有一个调用文件内部脚本的PowerShell任务--它不是“内联”PowerShell。该脚本需要Az.Accounts模块,所以我添加了Import-Module Az.Accounts。当我运行管道时,我得到以下结果: Import-Module : The specified module 'Az.Accounts' was not loaded because no valid moduleImport-Mo