Get-Command : The term 'Get-AzStorageBlobConte

2019-08-30 06:07发布

问题:

From my question about installing Azure Powershell I was able to install Azure Powershell 5.1

However when I try to run

Get-Command Get-AzStorageBlobContent

I get

Get-Command : The term 'Get-AzStorageBlobContent' 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.
At line:1 char:1
+ Get-Command Get-AzStorageBlobContent
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-AzStorageBlobContent:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

I can see the commands listed in the right panel of ISE and I get intellisence help

The link 135170 takes me here

Get-ExecutionPolicy

returns Restricted

回答1:

You could run set-executionpolicy remotesigned as administrator to fix the issue.

See: https://www.faqforge.com/windows/windows-powershell-running-scripts-is-disabled-on-this-system/