Description
Description
We are seeing an our PS module does not function anymore with the latest Az.Accounts version:
The latest version of Az.Accounts has broken our Powershell module.
we get this error when Az.Accounts 2.11.0 is installed :
--cut--
Get-InstalledModule Az.Accounts -AllVersions
Version Name Repository Description
2.11.0 Az.Accounts PSGallery Microsoft Azure PowerShell - Accounts credential...
Import-Module Az.Accounts
Register-AzStackHCI -SubscriptionId -TenantId
WARNING: The command Register-AzModule is part of Azure PowerShell module "Az.Accounts" and it is not installed. Run
"Install-Module Az.Accounts" to install it.
WARNING: The intelligent recommendation feature is in preview. Help us improve it by sharing your experience:
https://go.microsoft.com/fwlink/?linkid=2202436
You cannot call a method on a null-valued expression.
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
WHen I uninstall the Az.Accounts 2.11.0 and install 2.10.2 version, I see everything works fine for us.
Issue script & Debug output
nothings comes out when I enable debug
Environment data
$PSVersiontable
Name Value
---- -----
PSVersion 5.1.20348.1366
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.1366
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
Get-module Az*
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.11.0 Az.Accounts
Script 1.4.1 Az.StackHCI {Add-AzStackHCIVMAttestation, Disable-AzStackHCIAttestatio.
Error output
[100.101.202.128]: PS C:\Users\HciDeploymentUser\Documents> Resolve-AzError
WARNING: The command Resolve-AzError is part of Azure PowerShell module "Az.Accounts" and it is not installed. Run
"Install-Module Az.Accounts" to install it.
The term 'Resolve-AzError' 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.
+ CategoryInfo : ObjectNotFound: (Resolve-AzError:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException