簡體   English   中英

運行 Azure Powershell 內聯腳本

[英]Running Azure Powershell Inline Script

我有一個 powershell 腳本來備份 SQL 數據庫。 I run the script locally, i run the script on TFS release phase with Powershell Script (not the azure powershell task), and everything went well.

現在,我希望它使用Azure PowerShell script: InlineScript因為我想從我的 powershell 中刪除登錄部分。 我將用戶名\密碼保存在變量中以便登錄,我想擺脫它

這是腳本:

在此處輸入圖像描述

請注意,由於錯誤,我輸入了Login-AzureRmAccount 在此之后,我仍然得到它。

錯誤信息:

[錯誤]當應用程序未在 UserInteractive 模式下運行時顯示模式對話框或表單不是有效操作。 指定 ServiceNotification 或 DefaultDesktopOnly 樣式以顯示來自服務應用程序的通知。

[錯誤]運行 Login-AzureRmAccount 登錄。

如上所述,請將下拉菜單更改為“Azure 資源管理器”,因為在 Azure 經典中,此命令將轉換為 Start-AzureSqlDatabaseCopy,它沒有所有可用選項

https://docs.microsoft.com/en-us/powershell/module/servicemanagement/azure/start-azuresqldatabasecopy?view=azuresmps-4.0.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM