You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I got the below error every time I open cloudShell (PowerShell).
Import-Module: /opt/microsoft/powershell/7/profile.ps1:13
Line |
13 | Microsoft.PowerShell.Core\Import-Module -Name PSCloudShellUtility
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| This module requires Az.Accounts version 2.12.5. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this
| module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for
| troubleshooting information.
I tried the following commands as per the documentation, with no luck:
Name Account SubscriptionName Environment TenantId
Visual Studio Enterprise Subscription –… MSI@50342 Visual Studio Enterprise Subscripti… AzureCloud e1304ad9-93ba-4557-8b20-8c1c1143b399
PS /home/mahmoud> Register-AzResourceProvider -ProviderNamespace Microsoft.CloudShell
Register-AzResourceProvider: The 'Register-AzResourceProvider' command was found in the module 'Az.Resources', but the module could not be loaded. For more information, run 'Import-Module Az.Resources'.
PS /home/mahmoud> Import-Module Az.Resources
Write-Error: This module requires Az.Accounts version 2.12.5. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information.
Import-Module: The module to process 'Az.Resources.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest '/usr/local/share/powershell/Modules/Az.Resources/6.9.0/Az.Resources.psd1' was not processed because no valid module was found in any module directory.
PS /home/mahmoud>
Also, I tried to update the module, but got the below error.
PS /home/mahmoud> Update-Module -Name Az.Accounts
Install-Package: Unable to find repository '/usr/cloudshell/temp'. Use Get-PSRepository to see all available repositories.
PS /home/mahmoud> Get-PSRepository
Hi @mahmoud76 -- Thank you for the issue. One way of fixing this is to try and uninstall the older module then install the new one. Please try:
Uninstall-module Az.accounts
Install-module Az.Accounts
Hi,
I got the below error every time I open cloudShell (PowerShell).
Import-Module: /opt/microsoft/powershell/7/profile.ps1:13
Line |
13 | Microsoft.PowerShell.Core\Import-Module -Name PSCloudShellUtility
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| This module requires Az.Accounts version 2.12.5. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this
| module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for
| troubleshooting information.
I tried the following commands as per the documentation, with no luck:
PS /home/mahmoud> Select-AzSubscription -SubscriptionId f24f799f-4ad0-4f93-bdc6-3aa22a2ddfe1
Name Account SubscriptionName Environment TenantId
Visual Studio Enterprise Subscription –… MSI@50342 Visual Studio Enterprise Subscripti… AzureCloud e1304ad9-93ba-4557-8b20-8c1c1143b399
PS /home/mahmoud> Register-AzResourceProvider -ProviderNamespace Microsoft.CloudShell
Register-AzResourceProvider: The 'Register-AzResourceProvider' command was found in the module 'Az.Resources', but the module could not be loaded. For more information, run 'Import-Module Az.Resources'.
PS /home/mahmoud> Import-Module Az.Resources
Write-Error: This module requires Az.Accounts version 2.12.5. An earlier version of Az.Accounts is imported in the current PowerShell session. Please open a new session before importing this module. This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system. Please see https://aka.ms/azps-version-error for troubleshooting information.
Import-Module: The module to process 'Az.Resources.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest '/usr/local/share/powershell/Modules/Az.Resources/6.9.0/Az.Resources.psd1' was not processed because no valid module was found in any module directory.
PS /home/mahmoud>
Also, I tried to update the module, but got the below error.
PS /home/mahmoud> Update-Module -Name Az.Accounts
Install-Package: Unable to find repository '/usr/cloudshell/temp'. Use Get-PSRepository to see all available repositories.
PS /home/mahmoud> Get-PSRepository
Name InstallationPolicy SourceLocation
PSGallery Trusted https://www.powershellgallery.com/api/v2
The text was updated successfully, but these errors were encountered: