简体   繁体   English

如何在 Azure DevOps Azure Powershell 任务中启用 PowerShell 交互模式?

[英]How to enable PowerShell Interactive mode in Azure DevOps Azure Powershell Task?

I'm getting error in Azure DevOps Release pipeline - Windows Powershell is in non Interactive mode.我在 Azure DevOps 发布管道中遇到错误 - Windows Powershell 处于非交互模式。 Read and Prompt Functionality is not available.阅读和提示功能不可用。

while running the command -在运行命令时 -

Start-AzureRmDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName "ScheduledTrigger"

Confirm
Are you sure you want to start trigger 'ScheduledTrigger' in data factory 'WikiADF'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): 

During the pipeline, you can't use the interactive mode in PowerShell.在流水线的过程中,PowerShell中的交互模式是不能使用的。

Add the flag -Force , it's running the cmdlet without prompting for confirmation.添加标志-Force ,它会在不提示确认的情况下运行 cmdlet。

Start-AzureRmDataFactoryV2Trigger -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TriggerName "ScheduledTrigger" -Force

More info you can find here .您可以在此处找到更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure powershell 任务中的 AzureRM 命令:Azure DevOps - AzureRM commands in Azure powershell Task: Azure DevOps Azure DevOps-自定义任务-具有Azure身份验证的PowerShell - Azure DevOps - Custom Task - PowerShell with Azure Authentification PowerShell任务脚本路径Azure DevOps发布 - Script path of PowerShell task Azure DevOps release 在 Azure powershell 任务中添加/获取 Azure Keyvault 的秘密 - Add/get secret to Azure Keyvault with Azure powershell task in Azure devops 如何在 Powershell 中访问 Azure DevOps Stage name? - How to access Azure DevOps Stage name in Powershell? 如何使用 PowerShell 创建 Azure Devops Wiki 子页面 - How to create Azure Devops Wiki SubPage with PowerShell 在 Azure DevOps Powershell 管道任务中获取自己的服务主体名称 - Get own Service Principal Name in an Azure DevOps Powershell pipeline task Azure Devops Powershell 任务:生成变量的编程访问 - Azure Devops Powershell task: Programmatic Access of Build Variables 是否可以在遵循幂等原则的 Azure DevOps 中创建 PowerShell 任务 - Is it possible to create PowerShell task in Azure DevOps which follow the principle of idempotent 无法在 Azure Devops 中使用 PowerShell 任务获取令牌 - Unable to acquire token using PowerShell task in Azure Devops
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM