Azure powershell SDK disappeared

Hi, I have a PS script that runs every time I trigger PS. The script does import Azure.psd1 as follows
$modulePath = "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1"
Import-Module $modulePath

which used to work fine for more than 2 years, so I can issue commands against azure without the need to do import module manually each time1 or 2 years back.

All of a sudden, since a couple of days, whenever I trigger PS, I get an error

Import-Module : The specified module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1' 
was not loaded because no valid module file was found in any module directory.
At E:\.........\WindowsScripts\PS\PowershellCustomScripts\SetAZureSubscription.ps1:4 char:5
+ Import-Module $modulePath
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\Program File...zure\Azure.psd1:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

I was very astonished and visited the directoy, my astonishment was bigger when I discovered that really it was not there, SDK disappeared.

Anyway, I searched MS to reinstall the sdk, I land on a page

https://azure.microsoft.com/en-us/downloads/

where there are sdks for Java, .net but not powershell!!!

I noticed that it was possible to install a module “Azure Powershell”, which I did but when I tried to run the 1st command as follows,

Connect-AzAccount

I got

Connect-AzAccount : The ‘Connect-AzAccount’ command was found in the module ‘Az.Accounts’, but the module could not be loaded.
For more information, run 'Import-Module Az.Accounts
At line:1 char:1

  • Connect-AzAccount
  • CategoryInfo : ObjectNotFound: (Connect-AzAccount:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

What I understood since V3 of PS that as soon as modules are found in the path in one of the paths inside the variable

$env:psmodulepath

when module is called it is automatically loaded, in fact all AZ modules are in

C:\Program Files\WindowsPowerShell\Modules (there are a lot of them)

Any idea what went wrong? why SDK disappeared by itself? wher can I get it?

2nd, how can I load all modules automatically that are found in this directory? Thansks in advance

We are here to help with code issues you are having.

You are not have code issues. You have having environment issues. Unless we’ve had the exact same issue or close, there is no way to know what your issue is.
However, considering, that it worked in the past, and not now, suggest an environment change or system corruption. That means you either need to figure that out, or roll back to an earlier state, and if all else fails refresh your machine.

You also do not state what OS you are running or PS version you are running. We can assume at minimum you are on v3 or higher based on your comment:

What I understood since V3 of PS that as soon as modules are found in the path in one of the paths inside the variable

As for your comment…

https://azure.microsoft.com/en-us/downloads/

where there are sdks for Java, .net but not powershell!!!

We have no control over Microsoft site, and no input to them. You need to ping Microsoft Support on that directly.
Yet, MS has a bunch of sites of course to get stuff from.

https://devblogs.microsoft.com/powershell/windows-powershell-sdk

https://docs.microsoft.com/en-us/powershell/developer/windows-powershell

Windows PowerShell Documents on MSDN

•Installing the Windows PowerShell SDK Provides information about how to install the Windows PowerShell SDK.

• Writing a Windows PowerShell Module Provides information for administrators, script developers, and cmdlet developers who need to package and distribute their Windows PowerShell solutions.

• Writing a Windows PowerShell Cmdlet Provides information for designing and implementing cmdlets.

• Writing a Windows PowerShell Provider Provides information for designing and implementing Windows PowerShell providers. It will help you understand how Windows PowerShell providers work, and it provides sample code that you can use to start designing or writing your own providers.

• Writing a Windows PowerShell Host Application Provides information that can be used by program managers who are designing host applications and by developers who are implementing them. The host application can, define the runspace where commands are run, open sessions on a local or remote computer, and invoke the commands either synchronously or asynchronously based on the needs of the application.

• Writing a PowerShell Formatting File Provides information for the authoring of formatting files, which control the display format for the objects that are returned by commands (cmdlets, functions, and scripts).

• Windows PowerShell Reference Provides reference content for the APIs used in writing cmdlets, providers, and host applications, as well as other supporting APIs.

PowerShell will look to load modules from several locations …

(Get-Module -ListAvailable PowerShell*).path
(Get-Module -ListAvailable PS*).path
$env:PSModulePath

…as well as the ones you specify via …

Import-Module SomeModuleName 'enter full path'

… especially if they are non-standard / custom modules.

Auto loaded modules would be discovered this way of course.

Get-Module -All

How did you try an reinstall modules, and what profile did you install it to?

'*azure*','*az*','*sdk*' | 
%{Find-Module -Name $PSItem} | 
Select-Object -Property Name, Version, Repository | 
Format-Table -AutoSize

<#
Name                                           Version        Repository
----                                           -------        ----------
Azure.Storage                                  4.6.1          PSGallery 
Azure                                          5.3.0          PSGallery 
AzureRM.profile                                5.8.3          PSGallery 
...
#>
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-6

https://devblogs.microsoft.com/scripting/understanding-the-six-powershell-profiles

If you need to reinstall all things Azure and SDK, then, in an PS admin session:

'*azure*','*az*','*sdk*' | 
%{
    Find-Module -Name $PSItem | 
    Save-Module -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules -Force"
    Install-Module -Name $PSItem.Name -Force
} 

Thanks, OK,

I did install modules at a global scope using elevated privileges as indicated at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-1.3.0 by running

Install-Module -Name Az -AllowClobber

when I run

'*azure*','*az*','*sdk*' | %{Find-Module -Name $PSItem} | Select-Object -Property Name, Version, Repository | Format-Table -AutoSize

I get all AZ as follows (reduced the list)

Azure.Storage 4.6.1 PSGallery Azure 5.3.0 PSGallery AzureRM.profile 5.8.3 PSGallery Azure.AnalysisServices 0.5.4 PSGallery AzureRM.KeyVault 5.2.1 PSGallery AzureRM.Automation 6.1.1 PSGallery AzureRM.Compute 5.9.1 PSGallery AzureRM.Network 6.11.1 PSGallery AzureRM.AnalysisServices 0.6.14 PSGallery AzureRM.OperationalInsights 5.0.6 PSGallery AzureRM.ApiManagement 6.1.7 PSGallery AzureRM.Batch 4.1.5 PSGallery AzureRM.DataFactories 5.0.3 PSGallery AzureRM.Insights 5.1.5 PSGallery AzureRM.DataLakeAnalytics 5.1.4 PSGallery AzureRM.DataLakeStore 6.2.1 PSGallery AzureRM.HDInsight 4.1.8 PSGallery AzureRM.Dns 5.1.0 PSGallery AzureRM.Resources 6.7.3 PSGallery AzureRM.Backup 4.0.11 PSGallery AzureRM.Cdn 5.0.6 PSGallery AzureRM.LogicApp 4.1.4 PSGallery AzureRM.CognitiveServices 0.9.12 PSGallery AzureRM.ContainerRegistry 1.0.10 PSGallery AzureRM.DevTestLabs 4.0.9 PSGallery AzureRM.MachineLearning 0.18.5 PSGallery AzureRM.Media 0.10.4 PSGallery AzureRM.EventHub 0.7.0 PSGallery AzureRM.IotHub 3.1.8 PSGallery AzureRM.ContainerInstance 0.2.12 PSGallery AzureRM.Billing 0.14.6 PSGallery AzureRM.Consumption 0.3.7 PSGallery AzureRM.DataFactoryV2 0.5.11 PSGallery AzureRM.EventGrid 0.3.7 PSGallery AzureRM.RedisCache 5.1.0 PSGallery AzureRM.NotificationHubs 5.0.3 PSGallery AzureRM.MachineLearningCompute 0.4.8 PSGallery AzureRM.MarketplaceOrdering 0.2.7 PSGallery AzureRM.RecoveryServices 4.1.9 PSGallery AzureRM.ApplicationInsights 0.1.8 PSGallery AzureStackVaaS 4.0.0 PSGallery AzureAutomationTools.PackageManagement 0.6 PSGallery AzureStorageTools 1.0 PSGallery AzureGraphCmdlets 1.0.727.1 PSGallery Azure.ToolKit 1.3 PSGallery AzureResourceSecurity 0.3.5 PSGallery AzureStackUtils 2.2 PSGallery AzurePSDrive 0.9.3 PSGallery AzureAutomationVsoGitSync 1.2.1 PSGallery cEPRSDeployAzureWebsite 1.0 PSGallery Avanade.AzureReports 1.0.5 PSGallery AzureAutomationRunbookUtilities 1.2 PSGallery AzureKeyVaultPasswordRepo 1.0.0 PSGallery Sitecore.Azure 0.5.1 PSGallery AzureUtil 1.0.6 PSGallery AzureBlobStorageProvider 1.0.0.0 PSGallery AzureConnectionAssistant 1.0.3.26 PSGallery AzureSearch 0.0.5 PSGallery AzureRM.DataMigration 0.1.7 PSGallery SCOrchDev-AzureAutomationIntegration 3.0.4 PSGallery AzureRM.Reservations 0.1.6 PSGallery cMoveAzureTempDrive 1.0.1 PSGallery Avanade.AzureAD 1.3.0 PSGallery MrAAzure 1.8.1 PSGallery Provance.Azure 1.2.3 PSGallery AzureArmTemplateHelper 1.0.3 PSGallery AzureRM.ManagementPartner 0.1.4 PSGallery AzureAutomationTools.Logging 0.1 PSGallery azureVpnP2SSelfSignedCertificate 1.0.0.1 PSGallery AzureRmMinus 0.3.0.0 PSGallery AzureRM.Subscription.Preview 0.1.1 PSGallery AzureRM.Compute.Experiments 1.0.25 PSGallery AzureRM.Websites.Experiments 1.0.0 PSGallery SitecoreInstallAzure 1.0.0.9 PSGallery AzureCmdlets 17.0.6634.0 PSGallery AzureRM.RecoveryServices.Backup 4.5.2 PSGallery AzureRM.PowerBIEmbedded 4.1.10 PSGallery AzureRM.Storage 5.2.0 PSGallery AzureRM.Sql 4.12.1 PSGallery AzureRM.ServiceBus 0.6.13 PSGallery AzureRM.Scheduler 0.16.10 PSGallery AzureRM.Relay 0.3.12 PSGallery AzureRM.Tags 4.0.5 PSGallery AzureRM.Websites 5.2.0 PSGallery AzureRM.TrafficManager 4.1.3 PSGallery AzureRM.StreamAnalytics 4.0.10 PSGallery AzureRM.ServiceFabric 0.3.15 PSGallery AzureRM.RecoveryServices.SiteRecovery 0.2.12 PSGallery AzureRM.UsageAggregates 4.0.5 PSGallery AzureRM 6.13.1 PSGallery AzureRM.PolicyInsights 1.1.0 PSGallery AzureRM.ServerManagement 4.1.2 PSGallery AzureRM.SiteRecovery 5.0.6 PSGallery AzureAD 2.0.2.4 PSGallery AzureRM.SignalR 1.0.0 PSGallery AzureRM.AzureStackAdmin 0.11.1 PSGallery AzureRM.AzureStackStorage 0.10.9 PSGallery AzureADPreview 2.0.2.5 PSGallery AzureStack 1.7.0 PSGallery AzureRmStorageTable 1.0.0.23 PSGallery AzureRM.BootStrapper 0.4.0 PSGallery Azs.Azurebridge.Admin 0.2.0 PSGallery azure.databricks.cicd.tools 1.1.8 PSGallery Microsoft.Azure.ActiveDirectory.PIM.PSModule 2.0.0.1762 PSGallery xAzure 0.2.0.0 PSGallery xAzurePack 1.4.0.0 PSGallery AzureTableEntity 1.0.3.0 PSGallery AzureExt 0.2.5.83 PSGallery Microsoft.AzureStack.ReadinessChecker 1.1811.1101.1 PSGallery AzureDiagnosticsAndLogAnalytics 0.1 PSGallery AzureServiceBusCreation 1.0 PSGallery cEPRSAzureFeatures 1.0.0.0 PSGallery Azure.EventHub 0.9.0 PSGallery AzureIoT 1.0.0.5 PSGallery AzureProfile 0.0.8 PSGallery AzureServicePrincipalAccount 1.5.0 PSGallery AzurePublicIPAddresses 1.0 PSGallery cAzureStorage 1.0.0.1 PSGallery Avanade.Azure.Models 1.0.5 PSGallery AzureAutomationDebug 1.3.8 PSGallery AzureAutomationAuthoringToolkit 0.2.4.2 PSGallery AzureRM.Netcore 0.13.2 PSGallery posh-azure 0.3.7 PSGallery AzureRm.AvailabilitySetManagement 1.0.0.1 PSGallery Avanade.AzureAD.Graph 1.2.2 PSGallery IntelliTect.AzureRm 1.3.3.0 PSGallery biz.dfch.PS.Azure.ServiceBus.Client 1.0.2.20160609 PSGallery Azure-SecurityAsCode 0.1.25 PSGallery biz.dfch.PS.Azure.ServiceBus.Management 1.0.1.20160201 PSGallery Avanade.AzureStorage 1.3.2 PSGallery AzureDataLakeUtils 1.0 PSGallery MigrateTo-AzureRM 1.2.0.8 PSGallery AzureSaveMoney 1.0.6 PSGallery ps-AzureFaceAPI 1.0.1 PSGallery AzureML 1.0.1 PSGallery Avanade.AzureVault 1.3 PSGallery AzureRmImageManagement 1.0.0.37 PSGallery AzureResourceData 0.1.1 PSGallery AzureRestHelper 1.0.0.13 PSGallery PowerShellAzureFunctions 1.0.0 PSGallery AzureRM.Maps 1.0.5 PSGallery CWJAzureRegionIPRange 1.0 PSGallery UMN-Azure 1.2.1 PSGallery AzureRMAppGWCert 1.0.8 PSGallery AzureRMCertAuthentication 1.0.17 PSGallery PsAzureCli 1.1.0.2 PSGallery AzurePipelinesPS 1.1.6 PSGallery AzureTablesCmdlets 18.0.6883.0 PSGallery CredentialStore.AzureKeyVault 1.1.7 PSGallery posh-azurecli 0.1.10 PSGallery PSAzureQueue 0.3.2 PSGallery WakeUpAzureWebApp 1.3.2 PSGallery xAzureTempDrive 1.0.1.5 PSGallery AzureADB2C 1.7.273 PSGallery AdobeUM.AzureAD 1.0.1 PSGallery BitTitan.Runbooks.AzureAD.Beta 0.2.5 PSGallery AxAzureBlueprint 1.1.0 PSGallery BitTitan.Runbooks.AzureRM 0.2.4 PSGallery PsAzureDevOps 0.3.1 PSGallery BitTitan.Runbooks.AzureRM.Beta 0.2.4 PSGallery AzureRM.FrontDoor 0.1.1 PSGallery azurerm-helpers 1.0.11 PSGallery cAzureKeyVault 1.0.4 PSGallery AzureExtensions 1.0.0.2 PSGallery BitTitan.Runbooks.AzureRMS 0.2.9 PSGallery AzureSerialAccessConsole 1.1.0 PSGallery EasyAzureFunction 0.7.1 PSGallery AzureSimpleREST 0.1.45 PSGallery DosInstallUtilities.Azure 2.15 PSGallery HansenAzurePS 0.5 PSGallery PSAzureToolkit 1.0.1 PSGallery AzureDatacenterIPOrNo 1.1 PSGallery AzureDataManagementCmdlets 18.0.6883.0 PSGallery AzureDevOps 0.1.43 PSGallery BitTitan.Runbooks.AzureRMS.Beta 0.2.8 PSGallery AzSK.AzureDevOps 0.9.4 PSGallery AzureRMADAppPermissionsReport 1.2 PSGallery BitTitan.Runbooks.AzureAD 0.2.5 PSGallery New-AzureRMRESTApiAuthenticationToken 1.0.0.5 PSGallery dos-install-common-azure 1.3 PSGallery AzureRm.Extensions 0.1.4 PSGallery AzureFileSyncDsc 1.0.0.3 PSGallery Get-CAzureRMStorageServicesAuthorizationHeader 1.0.0.0 PSGallery Get-AzureADAuthTokens 1.0.0.1 PSGallery PSAzureDatabricks 0.4.0 PSGallery AzureVmSnapshots 0.1.2 PSGallery AzureRM.profile 5.8.3 PSGallery Azure.Storage 4.6.1 PSGallery AzureRM.KeyVault 5.2.1 PSGallery Azure 5.3.0 PSGallery AzureRM.Automation 6.1.1 PSGallery AzureRM.Compute 5.9.1 PSGallery AzureRM.Network 6.11.1 PSGallery AzureRM.AnalysisServices 0.6.14 PSGallery AzureRM.OperationalInsights 5.0.6 PSGallery AzureRM.ApiManagement 6.1.7 PSGallery AzureRM.Batch 4.1.5 PSGallery AzureRM.DataFactories 5.0.3 PSGallery Azure.AnalysisServices 0.5.4 PSGallery AzureRM.Insights 5.1.5 PSGallery AzureRM.DataLakeAnalytics 5.1.4 PSGallery AzureRM.DataLakeStore 6.2.1 PSGallery AzureRM.HDInsight 4.1.8 PSGallery AzureRM.Dns 5.1.0 PSGallery AzureRM.Resources 6.7.3 PSGallery AzureRM.Backup 4.0.11 PSGallery AzureRM.Cdn 5.0.6 PSGallery AzureRM.LogicApp 4.1.4 PSGallery AzureRM.CognitiveServices 0.9.12 PSGallery AzureRM.ContainerRegistry 1.0.10 PSGallery AzureRM.DevTestLabs 4.0.9 PSGallery AzureRM.MachineLearning 0.18.5 PSGallery AzureRM.Media 0.10.4 PSGallery AzureRM.EventHub 0.7.0 PSGallery AzureRM.IotHub 3.1.8 PSGallery AzureRM.ContainerInstance 0.2.12 PSGallery AzureRM.Billing 0.14.6 PSGallery AzureRM.Consumption 0.3.7 PSGallery AzureRM.DataFactoryV2 0.5.11 PSGallery AzureRM.EventGrid 0.3.7 PSGallery AzureRM.RedisCache 5.1.0 PSGallery AzureRM.NotificationHubs 5.0.3 PSGallery AzureRM.MachineLearningCompute 0.4.8 PSGallery AzureRM.MarketplaceOrdering 0.2.7 PSGallery AzureRM.RecoveryServices 4.1.9 PSGallery AzureRM.ApplicationInsights 0.1.8 PSGallery Az.ContainerRegistry 1.0.1 PSGallery Az.KeyVault 1.0.1 PSGallery Az.IotHub 1.0.2 PSGallery Az.LogicApp 1.1.0 PSGallery Az.TrafficManager 1.0.1 PSGallery Az.ServiceFabric 1.0.1 PSGallery Az.ContainerInstance 1.0.0 PSGallery Az.EventGrid 1.1.0 PSGallery Az.CognitiveServices 1.0.0 PSGallery Az.EventHub 1.0.0 PSGallery Az.StreamAnalytics 1.0.0 PSGallery Az.NotificationHubs 1.0.0 PSGallery Az.PolicyInsights 1.0.0 PSGallery Az.OperationalInsights 1.0.0 PSGallery Az.ServiceBus 1.0.0 PSGallery Az.RedisCache 1.0.0 PSGallery Az.MachineLearning 1.0.0 PSGallery Az.MarketplaceOrdering 1.0.0 PSGallery Az.PowerBIEmbedded 1.0.0 PSGallery Az.RecoveryServices 1.0.1 PSGallery Az.DataLakeStore 1.0.2 PSGallery Az.DataLakeAnalytics 1.0.0 PSGallery Az.DevTestLabs 1.0.0 PSGallery AzureADPreview 2.0.2.5 PSGallery Az.HDInsight 1.0.0 PSGallery Az.Monitor 1.0.0 PSGallery Az.DataFactory 1.0.1 PSGallery Az.Profile 0.7.0 PSGallery AzureRmStorageTable 1.0.0.23 PSGallery Az.Consumption 0.7.0 PSGallery Az.Insights 0.7.0 PSGallery Az.Tags 0.7.0 PSGallery Az.UsageAggregates 0.7.0 PSGallery Az.MachineLearningCompute 0.7.0 PSGallery AzSK 3.10.0 PSGallery AzureRM.AzureStackAdmin 0.11.1 PSGallery AzureRM.AzureStackStorage 0.10.9 PSGallery AzureRM.BootStrapper 0.4.0 PSGallery AzSDK 2.11.0 PSGallery AzureRM.RecoveryServices.Backup 4.5.2 PSGallery AzureRM.PowerBIEmbedded 4.1.10 PSGallery AzureRM.Storage 5.2.0 PSGallery AzureRM.Sql 4.12.1 PSGallery AzureRM.ServiceBus 0.6.13 PSGallery AzureRM.Scheduler 0.16.10 PSGallery AzureRM.Relay 0.3.12 PSGallery AzureRM.Tags 4.0.5 PSGallery AzureRM.Websites 5.2.0 PSGallery AzureRM.TrafficManager 4.1.3 PSGallery AzureRM.StreamAnalytics 4.0.10 PSGallery AzureRM.ServiceFabric 0.3.15 PSGallery AzureRM.RecoveryServices.SiteRecovery 0.2.12 PSGallery AzureRM.UsageAggregates 4.0.5 PSGallery AzureRM 6.13.1 PSGallery AzureRM.PolicyInsights 1.1.0 PSGallery AzureRM.ServerManagement 4.1.2 PSGallery AzureRM.SiteRecovery 5.0.6 PSGallery AzureAD 2.0.2.4 PSGallery Az 1.3.0 PSGallery AzureRM.SignalR 1.0.0 PSGallery Az.Storage 1.0.2 PSGallery Az.Aks 1.0.1 PSGallery Az.Resources 1.1.2 PSGallery Az.Automation 1.1.0 PSGallery Az.Compute 1.3.0 PSGallery Az.Batch 1.0.0 PSGallery Az.Cdn 1.0.1 PSGallery Az.Sql 1.2.0 PSGallery Az.Websites 1.1.0 PSGallery Az.Network 1.2.0 PSGallery Az.Billing 1.0.0 PSGallery Az.Dns 1.0.0 PSGallery Az.Media 1.0.0 PSGallery Az.Relay 1.0.0 PSGallery Az.Accounts 1.3.0 PSGallery Az.SignalR 1.0.2 PSGallery Az.AnalysisServices 1.0.1 PSGallery Az.ApiManagement 1.0.0 PSGallery Az.ApplicationInsights 1.0.0 PSGallery AzureStack 1.7.0 PSGallery AzureRmStorageQueue 1.0.0.4 PSGallery AzureAutomationAuthoringToolkit 0.2.4.2 PSGallery AzureRM.Netcore 0.13.2 PSGallery Azs.Azurebridge.Admin 0.2.0 PSGallery Azs.Infrastructureinsights.Admin 0.3.0 PSGallery Azs.Fabric.Admin 0.4.0 PSGallery Azs.Compute.Admin 0.2.2 PSGallery Azs.Gallery.Admin 0.2.0 PSGallery Azs.Backup.Admin 0.3.0 PSGallery Azs.Keyvault.Admin 0.2.0 PSGallery Azs.Commerce.Admin 0.2.0 PSGallery Azs.Storage.Admin 0.2.1 PSGallery Azs.Network.Admin 0.2.0 PSGallery Azs.Update.Admin 0.2.1 PSGallery Azs.Subscriptions.Admin 0.3.1 PSGallery Azs.Subscriptions 0.2.0 PSGallery xAzure 0.2.0.0 PSGallery xAzurePack 1.4.0.0 PSGallery Az.StorageSync 0.7.1 PSGallery cAzureStorage 1.0.0.1 PSGallery azure.databricks.cicd.tools 1.1.8 PSGallery Az.ResourceGraph 0.7.1 PSGallery Microsoft.Azure.ActiveDirectory.PIM.PSModule 2.0.0.1762 PSGallery Microsoft.AzureStack.ReadinessChecker 1.1811.1101.1 PSGallery AzureTableEntity 1.0.3.0 PSGallery AzurePSDrive 0.9.3 PSGallery AzureExt 0.2.5.83 PSGallery AzureDiagnosticsAndLogAnalytics 0.1 PSGallery AzureStackUtils 2.2 PSGallery AzureAutomationRunbookUtilities 1.2 PSGallery AzureKeyVaultPasswordRepo 1.0.0 PSGallery Avanade.AzureReports 1.0.5 PSGallery AzureBlobStorageProvider 1.0.0.0 PSGallery AzureRMAppGWCert 1.0.8 PSGallery AzureRMCertAuthentication 1.0.17 PSGallery SCOrchDev-AzureAutomationIntegration 3.0.4 PSGallery

Forgot to mention that when I run

$env:PSModulePath

I have

C:\Users\myuser\Documents\WindowsPowerShell\Modules; C:\Program Files\WindowsPowerShell\Modules; C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;
All Az modules are in C:\Program Files\WindowsPowerShell\Modules

 

As for this…

'*azure*','*az*','*sdk*' | %{Find-Module -Name $PSItem}

… that is getting modules from the MS PowerShellGallery, not from your local machine.

s for this …

Install-Module -Name Az -AllowClobber

… that does not install all the AZ modules. It is looking t install a mobile called specifically ‘az’. If you want them all, you need to pass as a wild card.

Install-Module -Name 'Az*' -AllowClobber

If all the modules are there and you are at PSv3 and higher and they are not auto-loading, then it is purely an environment issue you need to resolve.
Again, we’d have no idea what would have changed on your machine to cause this. Yet, your next set would be force import them all in your profile and re-test.