ulitosCoder
ulitosCoder

Reputation: 2049

The term 'Test-AzureRmDeployment' is not recognized as the name

I just got a task to test the Deployment of an Azure set of resources, but I got this messages when validating from Visual Studio 2019

The term 'Test-AzureRmDeployment' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again

I already reinstalled the Azure PowerShell module with these instructions and restarted VS, but I keep gettings these errors.

Many thanks for your help.

Upvotes: 0

Views: 2067

Answers (1)

4c74356b41
4c74356b41

Reputation: 72191

right, this one is easier, try doing Import-Module AzureRM.Resources and it would throw a specific error why it failed to load. You are, most likely, using both Az and AzureRM modules together and that would not work. What I suggest you do - remove AzureRM module(s).

  1. close all powershell windows\processes
  2. go to the folder where the modules are located on your system ( default is c:\program files x64\windowspowershellmodules )
  3. Delete all folders that have AzureRM in their name
  4. Install Az module (Install-Module Az -AllowClobber)
  5. Enable backwards compatibility (Enable-AzureRmAlias).

If that doesn't work, i suggest you remove both AzureRM and Az modules from the system and proceed with installing only Az module

Upvotes: 1

Related Questions