0

I have a powershell script in order to make a backup of a SQL Database. 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.

Now, i want it to run it with the Azure PowerShell script: InlineScript because i want to remove the login part from my powershell. I saved the username \ password in the variables in order to login and i want to get rid of that

This is the script :

enter image description here

Please notice that i put the Login-AzureRmAccount because of the error. After this, i'm still getting it.

Error message:

[error]Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

[error]Run Login-AzureRmAccount to login.

5
  • Your connection type should be Azure RM, not Azure Classic. Commented Sep 25, 2019 at 20:09
  • What should I change in order to use the classic one? Commented Sep 26, 2019 at 7:20
  • If I remove the login rm account part , I'm getting the same 2 errors Commented Sep 26, 2019 at 7:20
  • You can't change it. You're using Azure RM commands. You should use an Azure RM connection. Azure Classic won't work. Commented Sep 26, 2019 at 12:53
  • Where it has "Azure Connection Type," change the dropdown to "Azure Resource Manager" and you may need to create/update the service connection. Commented Sep 27, 2019 at 2:53

1 Answer 1

1

As mentioned above please change the dropdown to "Azure Resource Manager" because in Azure classic this command will translate to Start-AzureSqlDatabaseCopy which does not have all the options available

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.