Home > Enterprise >  i am trying to use local power shell as cloud power shell (azure power shell vs local power shell )
i am trying to use local power shell as cloud power shell (azure power shell vs local power shell )

Time:09-15

i am new I am trying to use local pc power shell to execute commands like on azure portal power shell. enter image description here in my local power shell i can login to azure using az login. az commands are running but i am trying to execute pg_dump --help but it say cannot recognize this command. but az commands are working fine.

enter image description here on azure power shell cli i can execute all the pg_dumb commands without issue.

please answer.

CodePudding user response:

I think you need to install Azure CLI in order to use the same commands on local powershell: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli

you need to have also pg_dump and pg_restore command-line utilities installed.

CodePudding user response:

pg_dump is not part of the Azure CLI but is a PostgreSQL client application.

Cloud Shell happens to have a lot of packages installed already (i.E. terraform) and apparently pg_dump.

If you want to use it locally on your client you might want to look at installing the corresponding client tools. Maybe this SO thread helps (if you are running Windows): How do I install just the client tools for PostgreSQL on Windows?

  • Related