Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
13.95k stars 16.08k forks source link

Does Deploy-AzTemplate.ps1 require PowerShell Core 6.x? #6271

Open mjcarrabine opened 5 years ago

mjcarrabine commented 5 years ago

Deploy-AzTemplate.ps1 requires PowerShell Az.

PowerShell Az supports Windows PowerShell and PowerShell Core (according to Introducing the new Azure PowerShell Az module):

With the Az module, Azure PowerShell is now compatible with PowerShell 5.1 on Windows and PowerShell Core 6.x and later on all supported platforms - including Windows, macOS, and Linux.

Does Deploy-AzTemplate.ps1 require PowerShell Core 6.x?

PR #5972 added a call to Split-Path $TemplateFile -LeafBase which is resulting in me getting Split-Path : A parameter cannot be found that matches parameter name 'LeafBase' when I run Deploy-AzTemplate.ps1 using Execute Script in Visual Studio 2017 in a Azure Resource Group Project which is executing in Windows PowerShell.

mjcarrabine commented 5 years ago

Not requiring PowerShell Core allows me to continue to execute PowerShell from within Visual Studio using PowerShell Tools for Visual Studio's right-click --> Execute as Script functionality.

Current Line 18 in Deploy-AzTemplate.ps1

justSteve commented 4 years ago

I've pasted the alternate line to the script (the $Deployment assignment is now on line 19) but still get the same error.