Long
Long

Reputation: 81

How to add Azure Powershell module to Visual Code Intellisense

Does anyone know how to add the intellisense for the Azure module in visual code? I installed the Azure Powershell module recently, and want to write some powershell script using visual code, but the editor doesn't give me any intellisense for the az functions, like Get-AzResourceGroup

Upvotes: 2

Views: 5113

Answers (1)

RoadRunner
RoadRunner

Reputation: 26315

There is a difference between Azure PowerShell and Azure CLI. Azure PowerShell is strictly for Windows PowerShell and PowerShell Core, whereas Azure CLI has cross-platform support for Windows, Mac and Linux. This also means if you have PowerShell Core on Mac or Linux, you can still use Azure PowerShell.

You can usually tell the syntactic difference between the two e.g. Get-AzResourceGroup vs az group list. It seems like you want the latter(Azure CLI), since you mention:

intellisense for the az functions

Furthermore, using the default PowerShell extension provided by Microsoft will be good enough to provide intellisense for Azure PowerShell CmdLets. However, for Azure CLI, you can install the Azure CLI Tools extension provided by Microsoft. This will provide intellisense on any .azcli files where you write your az commands.

Upvotes: 1

Related Questions