How to install SQLPackage and Powershell on Windows Azure Agent

sachin gupta 376 Reputation points
2022-04-18T14:15:04.397+00:00

Hello,

I have a windows Azure Agent which has been setup by our Azure Admin team. The agent does not have the SQLPackage and Powershell installed on it which is required for SQL DACPAC file generation. As part of my release pipeline I am using a powershell task also which is not working because it is not installed on the agent. Do we have any deploying task which can install SQLPackage and Powershell ?
Kindly provide your valuable inputs.

Thanks

Azure SQL Database
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2022-04-18T20:44:14.583+00:00

    Hi @sachin gupta You can refer to the development pipelines shared by @Alberto Morillo
    I know it says "upgrade" but it is an MSI installer and will install if not already installed, at the bottom has the instructions for dacfx/sqlpackage
    193984-image.png

    Regards
    Geetha


3 additional answers

Sort by: Most helpful
  1. Alberto Morillo 34,041 Reputation points MVP
    2022-04-18T14:36:38.553+00:00

    Please refer to this documentation: SqlPackage in development pipelines.

    You can also install it manually from here.

    In addition, you can run a pipeline task to deploy dacpacs as explained here. See other available tasks. WindRM is another pipeline task you can use. You can can also create your own agent to install what you need.


  2. sachin gupta 376 Reputation points
    2022-04-18T22:03:51.683+00:00

    @Alberto Morillo @GeethaThatipatri-MSFT ...i think this will help me.
    @Alberto Morillo ... the task which you mentioned, i am already using that to generate the dacpac file, but for that I am using the Windows-latest as the available VM from azure pool, but as soon as I switch to our self hosted VM, the dacpac generation fails because of unavailability of the packages. I guess with the YAML script mentioned by @GeethaThatipatri-MSFT will work for me.

    Thanks for all the assistance. Appreciate it.


  3. Raw Milk Dubai 0 Reputation points
    2024-07-15T04:59:20.7866667+00:00

    hi solve your issue?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.