I have install Windows azure powershell.
After that when i start as the Windows azure powershell as administrator i am getting an error ---
Saying The term 'Add-AzureAccount' is not recognized
How can i fix this error Anyone knows any solution !!
Before running that cmdlet, can you try
Import-Module Azure
if the module is not found, you can try
Install-Module Azure
Be sure to run powershell as administrator for the latter.
Related
I have a Powershell Script that contains az commands which i am running from an Azure Function
I have The module specified in requirements.psd1 and host json managed dependency is enabled
In my script I have put in the following commands
Get-Module -Name Az -ListAvailable
Import-Module Az
Get Module comes back as 4.8.0 is installed
I then get a warning
[Warning] The Function app may be missing a module containing the 'az' command definition. If this command belongs to a module available on the PowerShell Gallery, add a reference to this module to requirements.psd1. Make sure this module is compatible with PowerShell 7. For more details, see https://aka.ms/functions-powershell-managed-dependency. If the module is installed but you are still getting this error, try to import the module explicitly by invoking Import-Module just before the command that produces the error: this will not fix the issue but will expose the root cause.
Followed by by actual command
az storage account keys list <blah>
[Error] ERROR: The term 'az' 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.
az cli is not available currently out the box in the functions
powershell environment. This is a feature ask and we are looking into
it.
Please refer to GitHub Issue#221 for this.
Using the corresponding Azure PowerShell Modules shall be the only way to go for now.
You can use Get-AzStorageAccountKey instead of az storage account keys
I'm trying to use a template to deploy an ASE. I can't use the UI since they made it clear that you can't deploy to a pre-existing subnet in the portal, but you can by using a PS template.
I run the script and it prompts New-AzureRmResourceGroupDeployment : Run Login-AzureRmAccount to login.
But I've logged in.
After researching I've tried
1. Uninstalling AzureRM and re-installing
2. Running update-module and updating
Problem with your the error message is:
Login-AzureRMAccount is available with different modules.
For eg if you are using azureRM module cmdlets you should probably login with:
AzureRM.profile\Login-AzureRmAccount
Have you select the right subscription?
We can use this PowerShell command to select subscription Select-AzureRmSubscription -SubscriptionName.
Also, we should check the version of your Azure PowerShell with this command Get-Module -ListAvailable -Name Azure -Refresh, the latest version is 3.9.0. Please try other commands to make sure the Azure PowerShell works fine.
I'm trying to follow the directions here: Azure Resource Manager Cmdlets
I do this:
PS C:\> Install-Module AzureRM
That works, then I try this:
PS C:\> Install-AzureRM
I get this message:
Install-AzureRM : The term 'Install-AzureRM' is not recognized as the name of a cmdlet, function, script file, or operable program.
What am I missing?
The Install-Module in article you came across is referring to cmdlet come with WMF5.0. In other words, only available in Powershell 5.0
There is another version of Install-Module come with PsGet, but that one won't accomplish your task (Install-Module AzureRM), so please try to avoid it.
If you don't want to install powershell 5.0, but want azure cmdlet, you can find stand-alone module installer here.
I believe you want to use Import-AzureRM instead of Install-AzureRM
I am trying to change company name using 'Set-AdfsGlobalWebContent' of powershell 4.0 .
I am using power-shell ISE but I am not able to get this command.
I am working on windows server 2012 R2
Anybody explain me Why that command is not showing in intelligence? is I am missing something?
after executing this command forcefully it gives "'Set-AdfsGlobalWebContent' is not recognized as the name of a cmdlet" error.
Thanks in Advance !!!
From technet:
To use these cmdlets you must have previously installed the AD FS server role. This can be done using the Add Roles and Features Wizard in Server Manager or optionally, you can use the Install-WindowsFeature AD-Federation-Services cmdlet at a Windows PowerShell prompt to add the role.
I am using PowerShell to automate the creation of a virtual machine in Azure, then using Remote PowerShell to run commands on that machine. I can run any PowerShell command that ships with Windows perfectly well, but when I try to run something like:
Set-AzureSubscription or Get-AzureStorageBlobContent
I get the following message:
The term 'Set-AzureSubscription' is not recognized as the name of a cmdlet, function, script file, or operable program.
Of course, because the Azure module is not preloaded on the VM in Azure. Is it possible to copy the Azure Module up to the VM using PowerShell? Or any other way to go about this assuming everything must be automated with PowerShell (so I can't log into the VM to run the Azure PowerShell installer or copy and paste over a remote desktop session)?
Did use the Azure Powershell? If not you can install it here:
http://azure.microsoft.com/en-gb/documentation/articles/install-configure-powershell/
This is because you don't have Azure module installed
Try this to check:
Get-AzureModule Azure
You shoud get the module here:
http://azure.microsoft.com/en-us/downloads/#cmd-line-Tools