azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Mutex fail: Access to the path 'Global\AzurePowerShellConfigInit' is denied.

Open lzandman opened this issue 1 year ago • 4 comments

Description

On our Azure DevOps build-agents we regularly get the following error:

Access to the path 'Global\AzurePowerShellConfigInit' is denied.

This issue seems to be cause by the fact that we run two Azure DevOps agents on one server (VM). When both agents run some Az Powershell concurrently, this issue can manifest itself. We know this multiple DevOps agent per VM setup isn't best-practice and should be avoided. However, it is what it is and our admins so far haven't changed this setup. This same issue has also been reported on StackOverflow by someone else: https://stackoverflow.com/questions/78807247/azurepowershell5-fails-to-initialize-access-to-the-path-global-azurepowershe

Anyway, regardless of the DevOps scenario, I think this is a broader issue regarding running Az concurrently. I delved into the issue. This is the error call stack:

Error record:
Agent environment resources - Disk: D:\ Available 141031.00 MB out of 524270.00 MB, Memory: Used 7293.00 MB out of 16382.00 MB, CPU: Usage 10.71%
Import-Module : Access to the path 'Global\AzurePowerShellConfigInit' is denied.
At C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\2.19.0\Az.Accounts.psm1:104 char:1
+ Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.ImportModuleCommand
 
Script stack trace:
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\2.19.0\Az.Accounts.psm1: line 104
at Import-AzAccountsModule, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\ps_modules\VstsAzureHelpers_\InitializeAzModuleFunctions.ps1: line 213
at Initialize-AzModule, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\ps_modules\VstsAzureHelpers_\InitializeAzModuleFunctions.ps1: line 51
at <ScriptBlock>, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\CoreAz.ps1: line 31
at <ScriptBlock>, D:\Data\a10\_temp\5070c057-8f6b-4480-8b6a-68466c452cb7.ps1: line 3
at <ScriptBlock>, <No file>: line 1
Exception:
System.UnauthorizedAccessException: Access to the path 'Global\AzurePowerShellConfigInit' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.InitializeConfigs(AzureSession session, String profilePath, Action`1 writeWarning)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.CreateInstance(IDataStore dataStore, Action`1 writeWarning)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSession.Initialize(Func`1 instanceCreator, Boolean overwrite)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.InitializeAzureSession(Action`1 writeWarning)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.OnImport()
   at System.Management.Automation.Runspaces.PSSnapInHelpers.ExecuteModuleInitializer(Assembly assembly, Type[] assemblyTypes, Boolean isModuleLoad)
   at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Boolean isModuleLoad, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String helpFile, Type& randomCmdletToCheckLinkDemand, Type& randomProviderToCheckLinkDemand)
   at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Boolean isModuleLoad, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
   at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
   at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
   at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
Access to the path 'Global\AzurePowerShellConfigInit' is denied.
Processed: ##vso[task.logissue source=TaskInternal;type=error]Access to the path 'Global\AzurePowerShellConfigInit' is denied.

The issue seems to be caused by a failed creation of a global Mutex in the AzureSessionInitializer class: https://github.com/Azure/azure-powershell/blob/611a694abe53f830c1bd5f661266f8c06f2f0b58/src/Accounts/Authentication/AzureSessionInitializer.cs#L326C13-L326C86

I've done some Googling and it appears a race condition can happen between the creation of the global Mutex and setting its accompanying ACL. This should be prevented by providing security settings in the Mutex constructor (some discussion here and here).

In the latest versions of .NET it seems the Mutex constructor that accepts security settings has been removed. Instead there's now the MutexAcl class that should be used for this.

I hope this all makes sense and that Microsoft can provide a fix for this. Of course we will also try to get our DevOps agent setup fixed. But as I said before, I think this really is an issue that could manifest itself in other scenarios too.

Issue script & Debug output

Error record:
Agent environment resources - Disk: D:\ Available 141031.00 MB out of 524270.00 MB, Memory: Used 7293.00 MB out of 16382.00 MB, CPU: Usage 10.71%
Import-Module : Access to the path 'Global\AzurePowerShellConfigInit' is denied.
At C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\2.19.0\Az.Accounts.psm1:104 char:1
+ Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.ImportModuleCommand
 
Script stack trace:
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\2.19.0\Az.Accounts.psm1: line 104
at Import-AzAccountsModule, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\ps_modules\VstsAzureHelpers_\InitializeAzModuleFunctions.ps1: line 213
at Initialize-AzModule, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\ps_modules\VstsAzureHelpers_\InitializeAzModuleFunctions.ps1: line 51
at <ScriptBlock>, D:\Data\a10\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.242.0\CoreAz.ps1: line 31
at <ScriptBlock>, D:\Data\a10\_temp\5070c057-8f6b-4480-8b6a-68466c452cb7.ps1: line 3
at <ScriptBlock>, <No file>: line 1
Exception:
System.UnauthorizedAccessException: Access to the path 'Global\AzurePowerShellConfigInit' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.InitializeConfigs(AzureSession session, String profilePath, Action`1 writeWarning)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.CreateInstance(IDataStore dataStore, Action`1 writeWarning)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSession.Initialize(Func`1 instanceCreator, Boolean overwrite)
   at Microsoft.Azure.Commands.Common.Authentication.AzureSessionInitializer.InitializeAzureSession(Action`1 writeWarning)
   at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.OnImport()
   at System.Management.Automation.Runspaces.PSSnapInHelpers.ExecuteModuleInitializer(Assembly assembly, Type[] assemblyTypes, Boolean isModuleLoad)
   at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Boolean isModuleLoad, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String helpFile, Type& randomCmdletToCheckLinkDemand, Type& randomProviderToCheckLinkDemand)
   at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(Assembly assembly, String name, PSSnapInInfo psSnapInInfo, PSModuleInfo moduleInfo, Boolean isModuleLoad, Dictionary`2& cmdlets, Dictionary`2& aliases, Dictionary`2& providers, String& helpFile)
   at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(Assembly assembly, PSModuleInfo module)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(PSModuleInfo parentModule, Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, ImportModuleOptions options, ManifestProcessingFlags manifestProcessingFlags, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found, String shortModuleName, Boolean disableFormatUpdates)
   at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(PSModuleInfo parentModule, String fileName, String moduleBase, String prefix, SessionState ss, Object privateData, ImportModuleOptions& options, ManifestProcessingFlags manifestProcessingFlags, Boolean& found, Boolean& moduleFileFound)
   at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions importModuleOptions, String name)
   at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
Access to the path 'Global\AzurePowerShellConfigInit' is denied.
Processed: ##vso[task.logissue source=TaskInternal;type=error]Access to the path 'Global\AzurePowerShellConfigInit' is denied.

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.17763.6054
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.6054
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     2.19.0     Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAut...
Script     2.0.1      Az.Advisor                          {Disable-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration, Get-...
Script     6.0.3      Az.Aks                              {Disable-AzAksAddOn, Enable-AzAksAddOn, Get-AzAksCluster, Get-AzAksNodePool...}
Script     1.1.4      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, ...
Script     4.0.2      Az.ApiManagement                    {Add-AzApiManagementApiToGateway, Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGro...
Script     1.0.0      Az.App                              {Disable-AzContainerAppRevision, Enable-AzContainerAppRevision, Get-AzContainerApp, Get-AzContaine...
Script     1.3.1      Az.AppConfiguration                 {Clear-AzAppConfigurationDeletedStore, Get-AzAppConfigurationDeletedStore, Get-AzAppConfigurationK...
Script     2.2.5      Az.ApplicationInsights              {Get-AzApplicationInsights, Get-AzApplicationInsightsApiKey, Get-AzApplicationInsightsContinuousEx...
Script     1.0.1      Az.ArcResourceBridge                {Get-AzArcResourceBridge, Get-AzArcResourceBridgeApplianceCredential, Get-AzArcResourceBridgeCrede...
Script     2.0.2      Az.Attestation                      {Add-AzAttestationPolicySigner, Get-AzAttestationPolicy, Get-AzAttestationPolicySigners, Remove-Az...
Script     1.0.1      Az.Automanage                       {Get-AzAutomanageBestPractice, Get-AzAutomanageConfigProfile, Get-AzAutomanageConfigProfileAssignm...
Script     1.10.0     Az.Automation                       {Export-AzAutomationDscConfiguration, Export-AzAutomationDscNodeReportContent, Export-AzAutomation...
Script     3.6.0      Az.Batch                            {Disable-AzBatchAutoScale, Disable-AzBatchComputeNodeScheduling, Disable-AzBatchJob, Disable-AzBat...
Script     2.0.3      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}
Script     3.2.0      Az.Cdn                              {Clear-AzCdnEndpointContent, Clear-AzFrontDoorCdnEndpointContent, Disable-AzCdnCustomDomainCustomH...
Script     2.0.1      Az.CloudService                     {Get-AzCloudService, Get-AzCloudServiceInstanceView, Get-AzCloudServiceNetworkInterface, Get-AzClo...
Script     1.14.1     Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccount...
Script     7.3.0      Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk...}
Script     1.0.1      Az.ConfidentialLedger               {Get-AzConfidentialLedger, New-AzConfidentialLedger, New-AzConfidentialLedgerAADBasedSecurityPrinc...
Script     0.6.0      Az.ConnectedMachine                 {Connect-AzConnectedMachine, Get-AzConnectedExtensionMetadata, Get-AzConnectedMachine, Get-AzConne...
Script     4.0.1      Az.ContainerInstance                {Add-AzContainerInstanceOutput, Get-AzContainerGroup, Get-AzContainerInstanceCachedImage, Get-AzCo...
Script     4.2.1      Az.ContainerRegistry                {Connect-AzContainerRegistry, Get-AzContainerRegistryManifest, Get-AzContainerRegistryRepository, ...
Script     1.14.2     Az.CosmosDB                         {Get-AzCosmosDBAccount, Get-AzCosmosDBAccountKey, Get-AzCosmosDBCassandraKeyspace, Get-AzCosmosDBC...
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzDataBoxEdgeDevice, New-AzDataBoxEdgeDevic...
Script     1.7.2      Az.Databricks                       {Get-AzDatabricksAccessConnector, Get-AzDatabricksOutboundNetworkDependenciesEndpoint, Get-AzDatab...
Script     1.18.3     Az.DataFactory                      {Add-AzDataFactoryV2DataFlowDebugSessionPackage, Add-AzDataFactoryV2TriggerSubscription, Get-AzDat...
Script     1.0.3      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAna...
Script     1.3.0      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeS...
Script     2.4.0      Az.DataProtection                   {Backup-AzDataProtectionBackupInstanceAdhoc, Edit-AzDataProtectionPolicyRetentionRuleClientObject,...
Script     1.0.1      Az.DataShare                        {New-AzDataShareAccount, Get-AzDataShareAccount, Remove-AzDataShareAccount, New-AzDataShare...}
Script     4.3.1      Az.DesktopVirtualization            {Disconnect-AzWvdUserSession, Expand-AzWvdMsixImage, Get-AzWvdApplication, Get-AzWvdApplicationGro...
Script     1.1.1      Az.DevCenter                        {Deploy-AzDevCenterUserEnvironment, Get-AzDevCenterAdminAttachedNetwork, Get-AzDevCenterAdminCatal...
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVM...
Script     1.2.1      Az.Dns                              {Add-AzDnsRecordConfig, Get-AzDnsRecordSet, Get-AzDnsZone, New-AzDnsRecordConfig...}
Script     1.0.2      Az.ElasticSan                       {Add-AzElasticSanVolumeGroupNetworkRule, Get-AzElasticSan, Get-AzElasticSanSkuList, Get-AzElasticS...
Script     1.6.1      Az.EventGrid                        {Enable-AzEventGridPartnerTopic, Get-AzEventGridChannel, Get-AzEventGridDomain, Get-AzEventGridDom...
Script     4.2.2      Az.EventHub                         {New-AzEventHubAuthorizationRuleSASToken, Approve-AzEventHubPrivateEndpointConnection, Deny-AzEven...
Script     1.10.0     Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}
Script     4.0.8      Az.Functions                        {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Get-AzFunctionAppPlan, Get-AzFunctionAppSe...
Script     6.1.0      Az.HDInsight                        {Add-AzHDInsightClusterIdentity, Add-AzHDInsightComponentVersion, Add-AzHDInsightConfigValue, Add-...
Script     2.0.1      Az.HealthcareApis                   {Get-AzHealthcareApisService, Get-AzHealthcareApisWorkspace, Get-AzHealthcareDicomService, Get-AzH...
Script     2.7.5      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...
Script     5.3.0      Az.KeyVault                         {Add-AzKeyVaultCertificate, Add-AzKeyVaultCertificateContact, Add-AzKeyVaultKey, Add-AzKeyVaultMan...
Script     2.3.1      Az.Kusto                            {Add-AzKustoClusterLanguageExtension, Add-AzKustoDatabasePrincipal, Get-AzKustoAttachedDatabaseCon...
Script     1.0.1      Az.LoadTesting                      {Get-AzLoad, New-AzLoad, Remove-AzLoad, Update-AzLoad}
Script     1.5.1      Az.LogicApp                         {Get-AzIntegrationAccount, Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Ge...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory...
Script     1.0.0      Az.MachineLearningServices          {Get-AzMLServiceQuota, Get-AzMLServiceUsage, Get-AzMLServiceVMSize, Get-AzMLWorkspace...}
Script     1.4.1      Az.Maintenance                      {Get-AzApplyUpdate, Get-AzConfigurationAssignment, Get-AzMaintenanceConfiguration, Get-AzMaintenan...
Script     1.2.1      Az.ManagedServiceIdentity           {Get-AzFederatedIdentityCredential, Get-AzSystemAssignedIdentity, Get-AzUserAssignedIdentity, Get-...
Script     3.0.1      Az.ManagedServices                  {Get-AzManagedServicesAssignment, Get-AzManagedServicesDefinition, Get-AzManagedServicesMarketplac...
Script     2.0.1      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Invoke-AzMarketplaceSignTerms, Set-AzMarketplaceTerms, Stop-AzMarketplace...
Script     1.1.2      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNa...
Script     2.3.1      Az.Migrate                          {Get-AzMigrateDiscoveredServer, Get-AzMigrateHCIJob, Get-AzMigrateHCIReplicationFabric, Get-AzMigr...
Script     5.2.0      Az.Monitor                          {Add-AzLogProfile, Add-AzMetricAlertRule, Add-AzMetricAlertRuleV2, Add-AzWebtestAlertRule...}
Script     1.1.2      Az.MySql                            {Get-AzMySqlConfiguration, Get-AzMySqlConnectionString, Get-AzMySqlFirewallRule, Get-AzMySqlFlexib...
Script     7.5.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGatewayBackendAddressPool, Ad...
Script     1.0.1      Az.NetworkCloud                     {Deploy-AzNetworkCloudCluster, Disable-AzNetworkCloudStorageApplianceRemoteVendorManagement, Enabl...
Script     1.0.1      Az.Nginx                            {Get-AzNginxCertificate, Get-AzNginxConfiguration, Get-AzNginxDeployment, New-AzNginxCertificate...}
Script     1.1.2      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-...
Script     3.2.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource...
Script     1.6.5      Az.PolicyInsights                   {Get-AzPolicyAttestation, Get-AzPolicyEvent, Get-AzPolicyMetadata, Get-AzPolicyRemediation...}
Script     1.1.1      Az.PostgreSql                       {Get-AzPostgreSqlConfiguration, Get-AzPostgreSqlConnectionString, Get-AzPostgreSqlFirewallRule, Ge...
Script     2.0.0      Az.PowerBIEmbedded                  {Resume-AzPowerBIEmbeddedCapacity, Suspend-AzPowerBIEmbeddedCapacity, Get-AzPowerBIEmbeddedCapacit...
Script     1.0.4      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPrivateDnsZone, New-AzPrivateDnsZone...}
Script     6.9.0      Az.RecoveryServices                 {Add-AzRecoveryServicesAsrReplicationProtectedItemDisk, Backup-AzRecoveryServicesBackupItem, Copy-...
Script     1.9.0      Az.RedisCache                       {Export-AzRedisCache, Get-AzRedisCache, Get-AzRedisCacheFirewallRule, Get-AzRedisCacheKey...}
Script     1.2.1      Az.RedisEnterpriseCache             {Export-AzRedisEnterpriseCache, Get-AzRedisEnterpriseCache, Get-AzRedisEnterpriseCacheDatabase, Ge...
Script     2.0.1      Az.Relay                            {Get-AzRelayAuthorizationRule, Get-AzRelayHybridConnection, Get-AzRelayKey, Get-AzRelayNamespace...}
Script     0.13.1     Az.ResourceGraph                    {Search-AzGraph, Get-AzResourceGraphQuery, New-AzResourceGraphQuery, Remove-AzResourceGraphQuery...}
Script     1.2.1      Az.ResourceMover                    {Add-AzResourceMoverMoveResource, Get-AzResourceMoverMoveCollection, Get-AzResourceMoverMoveResour...
Script     6.16.2     Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment...}
Script     1.6.2      Az.Security                         {Add-AzSecurityAdaptiveNetworkHardening, Add-AzSecuritySqlVulnerabilityAssessmentBaseline, Confirm...
Script     3.1.2      Az.SecurityInsights                 {Get-AzSentinelAlertRule, Get-AzSentinelAlertRuleAction, Get-AzSentinelAlertRuleTemplate, Get-AzSe...
Script     3.1.1      Az.ServiceBus                       {New-AzServiceBusAuthorizationRuleSASToken, Test-AzServiceBusNameAvailability, Approve-AzServiceBu...
Script     3.3.2      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricManagedClusterClientCertificate, Add-AzS...
Script     2.0.1      Az.SignalR                          {Get-AzSignalR, Get-AzSignalRKey, Get-AzSignalRUsage, New-AzSignalR...}
Script     4.10.0     Az.Sql                              {Invoke-AzSqlServerExternalGovernanceStatusRefresh, Get-AzSqlDatabaseTransparentDataEncryption, Se...
Script     2.2.1      Az.SqlVirtualMachine                {Get-AzAvailabilityGroupListener, Get-AzSqlVM, Get-AzSqlVMGroup, Invoke-AzRedeploySqlVM...}
Script     2.3.2      Az.StackHCI                         {Add-AzStackHCIVMAttestation, Disable-AzStackHCIAttestation, Disable-AzStackHCIRemoteSupport, Enab...
Script     1.0.3      Az.StackHCIVM                       {Add-AzStackHCIVMVirtualMachineDataDisk, Add-AzStackHCIVMVirtualMachineNetworkInterface, Get-AzSta...
Script     6.2.0      Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountManagementPolicyAction, Add-AzStorageAccou...
Script     1.3.1      Az.StorageMover                     {Get-AzStorageMover, Get-AzStorageMoverAgent, Get-AzStorageMoverEndpoint, Get-AzStorageMoverJobDef...
Script     2.1.1      Az.StorageSync                      {Get-AzStorageSyncCloudEndpoint, Get-AzStorageSyncGroup, Get-AzStorageSyncServer, Get-AzStorageSyn...
Script     2.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsCluster, Get-AzStreamAnalyticsClusterStreamingJob, Get-AzStreamAnalyticsDefa...
Script     0.11.1     Az.Subscription                     {Disable-AzSubscription, Enable-AzSubscription, Get-AzSubscriptionAcceptOwnershipStatus, Get-AzSub...
Script     1.0.1      Az.Support                          {Get-AzSupportProblemClassification, Get-AzSupportService, Get-AzSupportTicket, Get-AzSupportTicke...
Script     3.0.7      Az.Synapse                          {Add-AzSynapseDataFlowDebugSessionPackage, Add-AzSynapseTriggerSubscription, Clear-AzSynapseSqlPoo...
Script     1.2.2      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-...
Script     3.2.1      Az.Websites                         {Add-AzWebAppAccessRestrictionRule, Add-AzWebAppTrafficRouting, Edit-AzWebAppBackupConfiguration, ...

Error output

We cannot reproduce the issue on command. It happens randomly (as race conditions often do). So we aren't able to provide this info.

lzandman avatar Jul 30 '24 10:07 lzandman

@lzandman are the agents installed to the same or different OS users? Azure PowerShell uses mutex to protect the config file. Even if it fails to acquire the lock, it should write warnings instead of throwing.

https://github.com/Azure/azure-powershell/blob/611a694abe53f830c1bd5f661266f8c06f2f0b58/src/Accounts/Authentication/AzureSessionInitializer.cs#L328C17-L328C20

isra-fel avatar Aug 06 '24 08:08 isra-fel

@isra-fel In my case, the two agents run using different OS users.

jbtcode avatar Aug 07 '24 15:08 jbtcode

@lzandman are the agents installed to the same or different OS users?

They were running under the same user account. We are now using different accounts. But still seeing the issue.

Azure PowerShell uses mutex to protect the config file. Even if it fails to acquire the lock, it should write warnings instead of throwing. https://github.com/Azure/azure-powershell/blob/611a694abe53f830c1bd5f661266f8c06f2f0b58/src/Accounts/Authentication/AzureSessionInitializer.cs#L328C17-L328C20

The exception is not thrown from the mutex.WaitOne() call your link points to, but from the Mutex constructor above: https://github.com/Azure/azure-powershell/blob/e0fcfb5ede02a7620b650fd371edc3bdf6bfeb3a/src/Accounts/Authentication/AzureSessionInitializer.cs#L326

lzandman avatar Aug 29 '24 09:08 lzandman

Not much happenening here. Is this issue still going to be triaged?

lzandman avatar Oct 02 '24 07:10 lzandman

Hi,

I am also running into this.

In my case, I have multiple scheduled tasks that run script transfer-files.ps1 with different parameters at the same time. The tasks run as user local service.

When some of the tasks fails, I can run them on-demand via task scheduler and they run and complete just fine. Concurrent tasks seem to be the issue.

"Access to the path 'Global\AzurePowerShellConfigInit' is denied."
Connect-AzAccount: F:\scripts\xxxx\transfer-files.ps1:599
Line |
 599 |              $null = Connect-AzAccount -Identity
     |                      ~~~~~~~~~~~~~~~~~
     | 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'.

PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.0
PSEdition                      Core
GitCommitId                    7.5.0
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Modules


    Directory: C:\Users\myuser\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     13.3.0                Az                                  Core,Desk 
Script     4.0.2                 Az.Accounts                         Core,Desk {Disable-AzDataCollection, Disable-AzCon…
Script     2.1.0                 Az.Advisor                          Core,Desk {Disable-AzAdvisorRecommendation, Enable…
Script     6.1.0                 Az.Aks                              Core,Desk {Disable-AzAksAddOn, Enable-AzAksAddOn, …
Script     1.2.0                 Az.AnalysisServices                 Core,Desk {Add-AzAnalysisServicesAccount, Export-A…
Script     4.1.0                 Az.ApiManagement                    Core,Desk {Add-AzApiManagementApiToGateway, Add-Az…
Script     2.0.1                 Az.App                              Core,Desk {Disable-AzContainerAppRevision, Enable-…
Script     1.4.0                 Az.AppConfiguration                 Core,Desk {Clear-AzAppConfigurationDeletedStore, G…
Script     2.3.0                 Az.ApplicationInsights              Core,Desk {Get-AzApplicationInsights, Get-AzApplic…
Script     1.1.0                 Az.ArcResourceBridge                Core,Desk {Get-AzArcResourceBridge, Get-AzArcResou…
Script     2.1.0                 Az.Attestation                      Core,Desk {Add-AzAttestationPolicySigner, Get-AzAt…
Script     1.1.0                 Az.Automanage                       Core,Desk {Get-AzAutomanageBestPractice, Get-AzAut…
Script     1.11.1                Az.Automation                       Core,Desk {Export-AzAutomationDscConfiguration, Ex…
Script     3.7.0                 Az.Batch                            Core,Desk {Disable-AzBatchAutoScale, Disable-AzBat…
Script     2.2.0                 Az.Billing                          Core,Desk {Get-AzBillingAccount, Get-AzBillingInvo…
Script     3.3.0                 Az.Cdn                              Core,Desk {Clear-AzCdnEndpointContent, Clear-AzFro…
Script     2.1.0                 Az.CloudService                     Core,Desk {Get-AzCloudService, Get-AzCloudServiceI…
Script     1.15.0                Az.CognitiveServices                Core,Desk {Add-AzCognitiveServicesAccountNetworkRu…
Script     9.1.0                 Az.Compute                          Core,Desk {Add-AzImageDataDisk, Add-AzVhd, Add-AzV…
Script     1.1.0                 Az.ConfidentialLedger               Core,Desk {Get-AzConfidentialLedger, New-AzConfide…
Script     1.1.1                 Az.ConnectedMachine                 Core,Desk {Connect-AzConnectedMachine, Get-AzConne…
Script     4.1.1                 Az.ContainerInstance                Core,Desk {Add-AzContainerInstanceOutput, Get-AzCo…
Script     4.3.0                 Az.ContainerRegistry                Core,Desk {Connect-AzContainerRegistry, Get-AzCont…
Script     1.17.0                Az.CosmosDB                         Core,Desk {Get-AzCosmosDBAccount, Get-AzCosmosDBAc…
Script     1.2.1                 Az.DataBoxEdge                      Core,Desk {Get-AzDataBoxEdgeBandwidthSchedule, Get…
Script     1.10.0                Az.Databricks                       Core,Desk {Get-AzDatabricksAccessConnector, Get-Az…
Script     1.19.1                Az.DataFactory                      Core,Desk {Add-AzDataFactoryV2DataFlowDebugSession…
Script     1.1.0                 Az.DataLakeAnalytics                Core,Desk {Add-AzDataLakeAnalyticsDataSource, Add-…
Script     1.4.0                 Az.DataLakeStore                    Core,Desk {Add-AzDataLakeStoreFirewallRule, Add-Az…
Script     2.6.1                 Az.DataProtection                   Core,Desk {Backup-AzDataProtectionBackupInstanceAd…
Script     1.1.1                 Az.DataShare                        Core,Desk {Get-AzDataShare, Get-AzDataShareAccount…
Script     5.4.1                 Az.DesktopVirtualization            Core,Desk {Disconnect-AzWvdUserSession, Expand-AzW…
Script     2.0.1                 Az.DevCenter                        Core,Desk {Connect-AzDevCenterAdminCatalog, Connec…
Script     1.1.0                 Az.DevTestLabs                      Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzDt…
Script     1.3.1                 Az.Dns                              Core,Desk {Add-AzDnsRecordConfig, Get-AzDnsRecordS…
Script     1.1.1                 Az.DnsResolver                      Core,Desk {Get-AzDnsForwardingRuleset, Get-AzDnsFo…
Script     1.2.1                 Az.ElasticSan                       Core,Desk {Add-AzElasticSanVolumeGroupNetworkRule,…
Script     2.2.0                 Az.EventGrid                        Core,Desk {Disable-AzEventGridPartnerTopic, Enable…
Script     5.2.0                 Az.EventHub                         Core,Desk {New-AzEventHubAuthorizationRuleSASToken…
Script     1.12.0                Az.FrontDoor                        Core,Desk {Disable-AzFrontDoorCustomDomainHttps, E…
Script     4.2.0                 Az.Functions                        Core,Desk {Get-AzFunctionApp, Get-AzFunctionAppAva…
Script     6.3.1                 Az.HDInsight                        Core,Desk {Add-AzHDInsightClusterIdentity, Add-AzH…
Script     2.1.0                 Az.HealthcareApis                   Core,Desk {Get-AzHealthcareApisService, Get-AzHeal…
Script     1.0.0                 Az.HealthDataAIServices             Core,Desk {Get-AzDeidService, New-AzDeidService, R…
Script     2.8.0                 Az.IotHub                           Core,Desk {Add-AzIotHubCertificate, Add-AzIotHubCo…
Script     6.3.1                 Az.KeyVault                         Core,Desk {Add-AzKeyVaultCertificate, Add-AzKeyVau…
Script     2.4.0                 Az.Kusto                            Core,Desk {Add-AzKustoClusterCalloutPolicy, Add-Az…
Script     1.1.0                 Az.LoadTesting                      Core,Desk {Get-AzLoad, New-AzLoad, Remove-AzLoad, …
Script     1.6.0                 Az.LogicApp                         Core,Desk {Get-AzIntegrationAccount, Get-AzIntegra…
Script     1.2.0                 Az.MachineLearning                  Core,Desk {Add-AzMlWebServiceRegionalProperty, Exp…
Script     1.2.0                 Az.MachineLearningServices          Core,Desk {Get-AzMLServiceQuota, Get-AzMLServiceUs…
Script     1.5.1                 Az.Maintenance                      Core,Desk {Get-AzApplyUpdate, Get-AzConfigurationA…
Script     1.3.0                 Az.ManagedServiceIdentity           Core,Desk {Get-AzFederatedIdentityCredential, Get-…
Script     3.1.0                 Az.ManagedServices                  Core,Desk {Get-AzManagedServicesAssignment, Get-Az…
Script     2.1.0                 Az.MarketplaceOrdering              Core,Desk {Get-AzMarketplaceTerms, Invoke-AzMarket…
Script     1.2.0                 Az.Media                            Core,Desk {Get-AzMediaService, Get-AzMediaServiceK…
Script     2.7.0                 Az.Migrate                          Core,Desk {Get-AzMigrateDiscoveredServer, Get-AzMi…
Script     6.0.1                 Az.Monitor                          Core,Desk {Add-AzLogProfile, Add-AzMetricAlertRule…
Script     1.3.0                 Az.MySql                            Core,Desk {Get-AzMySqlConfiguration, Get-AzMySqlCo…
Script     7.14.0                Az.Network                          Core,Desk {Add-AzApplicationGatewayAuthenticationC…
Script     1.1.0                 Az.NetworkCloud                     Core,Desk {Deploy-AzNetworkCloudCluster, Disable-A…
Script     1.2.0                 Az.Nginx                            Core,Desk {Get-AzNginxCertificate, Get-AzNginxConf…
Script     1.2.0                 Az.NotificationHubs                 Core,Desk {Get-AzNotificationHub, Get-AzNotificati…
Script     3.3.0                 Az.OperationalInsights              Core,Desk {Disable-AzOperationalInsightsIISLogColl…
Script     1.1.0                 Az.Oracle                           Core,Desk {Add-AzOracleCloudVMClusterVM, Get-AzOra…
Script     1.7.1                 Az.PolicyInsights                   Core,Desk {Get-AzPolicyAttestation, Get-AzPolicyEv…
Script     1.2.0                 Az.PostgreSql                       Core,Desk {Get-AzPostgreSqlConfiguration, Get-AzPo…
Script     2.1.0                 Az.PowerBIEmbedded                  Core,Desk {Get-AzPowerBIEmbeddedCapacity, New-AzPo…
Script     1.2.0                 Az.PrivateDns                       Core,Desk {Add-AzPrivateDnsRecordConfig, Get-AzPri…
Script     7.5.1                 Az.RecoveryServices                 Core,Desk {Add-AzRecoveryServicesAsrReplicationPro…
Script     1.11.0                Az.RedisCache                       Core,Desk {Export-AzRedisCache, Get-AzRedisCache, …
Script     1.4.1                 Az.RedisEnterpriseCache             Core,Desk {Export-AzRedisEnterpriseCache, Get-AzRe…
Script     2.1.0                 Az.Relay                            Core,Desk {Get-AzRelayAuthorizationRule, Get-AzRel…
Script     1.2.0                 Az.ResourceGraph                    Core,Desk {Search-AzGraph, Get-AzResourceGraphQuer…
Script     1.3.0                 Az.ResourceMover                    Core,Desk {Add-AzResourceMoverMoveResource, Get-Az…
Script     7.9.0                 Az.Resources                        Core,Desk {Export-AzResourceGroup, Export-AzTempla…
Script     1.8.0                 Az.Security                         Core,Desk {Add-AzSecurityAdaptiveNetworkHardening,…
Script     3.2.0                 Az.SecurityInsights                 Core,Desk {Get-AzSentinelAlertRule, Get-AzSentinel…
Script     4.1.1                 Az.ServiceBus                       Core,Desk {New-AzServiceBusAuthorizationRuleSASTok…
Script     3.5.0                 Az.ServiceFabric                    Core,Desk {Add-AzServiceFabricClientCertificate, A…
Script     2.1.0                 Az.SignalR                          Core,Desk {Get-AzSignalR, Get-AzSignalRKey, Get-Az…
Script     6.0.2                 Az.Sql                              Core,Desk {Add-AzSqlDatabaseToFailoverGroup, Add-A…
Script     2.4.0                 Az.SqlVirtualMachine                Core,Desk {Assert-AzSqlVMEntraAuth, Get-AzAvailabi…
Script     2.5.0                 Az.StackHCI                         Core,Desk {Add-AzStackHCIVMAttestation, Disable-Az…
Script     1.1.0                 Az.StackHCIVM                       Core,Desk {Add-AzStackHCIVMVirtualMachineDataDisk,…
Script     8.2.0                 Az.Storage                          Core,Desk {Add-AzRmStorageContainerLegalHold, Add-…
Script     1.5.0                 Az.StorageMover                     Core,Desk {Get-AzStorageMover, Get-AzStorageMoverA…
Script     2.4.1                 Az.StorageSync                      Core,Desk {Get-AzStorageSyncCloudEndpoint, Get-AzS…
Script     2.1.0                 Az.StreamAnalytics                  Core,Desk {Get-AzStreamAnalyticsCluster, Get-AzStr…
Script     2.1.0                 Az.Support                          Core,Desk {Get-AzSupportChatTranscript, Get-AzSupp…
Script     3.1.2                 Az.Synapse                          Core,Desk {Add-AzSynapseDataFlowDebugSessionPackag…
Script     1.3.0                 Az.TrafficManager                   Core,Desk {Add-AzTrafficManagerCustomHeaderToEndpo…
Script     3.3.1                 Az.Websites                         Core,Desk {Add-AzWebAppAccessRestrictionRule, Add-…
Script     1.0.0                 Az.Workloads                        Core,Desk {Get-AzWorkloadsMonitor, Get-AzWorkloads…

    Directory: C:\Program Files\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     13.3.0                Az                                  Core,Desk 
Script     4.0.2                 Az.Accounts                         Core,Desk {Disable-AzDataCollection, Disable-AzCon…
Script     2.1.0                 Az.Advisor                          Core,Desk {Disable-AzAdvisorRecommendation, Enable…
Script     6.1.0                 Az.Aks                              Core,Desk {Disable-AzAksAddOn, Enable-AzAksAddOn, …
Script     1.2.0                 Az.AnalysisServices                 Core,Desk {Add-AzAnalysisServicesAccount, Export-A…
Script     4.1.0                 Az.ApiManagement                    Core,Desk {Add-AzApiManagementApiToGateway, Add-Az…
Script     2.0.1                 Az.App                              Core,Desk {Disable-AzContainerAppRevision, Enable-…
Script     1.4.0                 Az.AppConfiguration                 Core,Desk {Clear-AzAppConfigurationDeletedStore, G…
Script     2.3.0                 Az.ApplicationInsights              Core,Desk {Get-AzApplicationInsights, Get-AzApplic…
Script     1.1.0                 Az.ArcResourceBridge                Core,Desk {Get-AzArcResourceBridge, Get-AzArcResou…
Script     2.1.0                 Az.Attestation                      Core,Desk {Add-AzAttestationPolicySigner, Get-AzAt…
Script     1.1.0                 Az.Automanage                       Core,Desk {Get-AzAutomanageBestPractice, Get-AzAut…
Script     1.11.1                Az.Automation                       Core,Desk {Export-AzAutomationDscConfiguration, Ex…
Script     3.7.0                 Az.Batch                            Core,Desk {Disable-AzBatchAutoScale, Disable-AzBat…
Script     2.2.0                 Az.Billing                          Core,Desk {Get-AzBillingAccount, Get-AzBillingInvo…
Script     3.3.0                 Az.Cdn                              Core,Desk {Clear-AzCdnEndpointContent, Clear-AzFro…
Script     2.1.0                 Az.CloudService                     Core,Desk {Get-AzCloudService, Get-AzCloudServiceI…
Script     1.15.0                Az.CognitiveServices                Core,Desk {Add-AzCognitiveServicesAccountNetworkRu…
Script     9.1.0                 Az.Compute                          Core,Desk {Add-AzImageDataDisk, Add-AzVhd, Add-AzV…
Script     1.1.0                 Az.ConfidentialLedger               Core,Desk {Get-AzConfidentialLedger, New-AzConfide…
Script     1.1.1                 Az.ConnectedMachine                 Core,Desk {Connect-AzConnectedMachine, Get-AzConne…
Script     4.1.1                 Az.ContainerInstance                Core,Desk {Add-AzContainerInstanceOutput, Get-AzCo…
Script     4.3.0                 Az.ContainerRegistry                Core,Desk {Connect-AzContainerRegistry, Get-AzCont…
Script     1.17.0                Az.CosmosDB                         Core,Desk {Get-AzCosmosDBAccount, Get-AzCosmosDBAc…
Script     1.2.1                 Az.DataBoxEdge                      Core,Desk {Get-AzDataBoxEdgeBandwidthSchedule, Get…
Script     1.10.0                Az.Databricks                       Core,Desk {Get-AzDatabricksAccessConnector, Get-Az…
Script     1.19.1                Az.DataFactory                      Core,Desk {Add-AzDataFactoryV2DataFlowDebugSession…
Script     1.1.0                 Az.DataLakeAnalytics                Core,Desk {Add-AzDataLakeAnalyticsDataSource, Add-…
Script     1.4.0                 Az.DataLakeStore                    Core,Desk {Add-AzDataLakeStoreFirewallRule, Add-Az…
Script     2.6.1                 Az.DataProtection                   Core,Desk {Backup-AzDataProtectionBackupInstanceAd…
Script     1.1.1                 Az.DataShare                        Core,Desk {Get-AzDataShare, Get-AzDataShareAccount…
Script     5.4.1                 Az.DesktopVirtualization            Core,Desk {Disconnect-AzWvdUserSession, Expand-AzW…
Script     2.0.1                 Az.DevCenter                        Core,Desk {Connect-AzDevCenterAdminCatalog, Connec…
Script     1.1.0                 Az.DevTestLabs                      Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzDt…
Script     1.3.1                 Az.Dns                              Core,Desk {Add-AzDnsRecordConfig, Get-AzDnsRecordS…
Script     1.1.1                 Az.DnsResolver                      Core,Desk {Get-AzDnsForwardingRuleset, Get-AzDnsFo…
Script     1.2.1                 Az.ElasticSan                       Core,Desk {Add-AzElasticSanVolumeGroupNetworkRule,…
Script     2.2.0                 Az.EventGrid                        Core,Desk {Disable-AzEventGridPartnerTopic, Enable…
Script     5.2.0                 Az.EventHub                         Core,Desk {New-AzEventHubAuthorizationRuleSASToken…
Script     1.12.0                Az.FrontDoor                        Core,Desk {Disable-AzFrontDoorCustomDomainHttps, E…
Script     4.2.0                 Az.Functions                        Core,Desk {Get-AzFunctionApp, Get-AzFunctionAppAva…
Script     6.3.1                 Az.HDInsight                        Core,Desk {Add-AzHDInsightClusterIdentity, Add-AzH…
Script     2.1.0                 Az.HealthcareApis                   Core,Desk {Get-AzHealthcareApisService, Get-AzHeal…
Script     1.0.0                 Az.HealthDataAIServices             Core,Desk {Get-AzDeidService, New-AzDeidService, R…
Script     2.8.0                 Az.IotHub                           Core,Desk {Add-AzIotHubCertificate, Add-AzIotHubCo…
Script     6.3.1                 Az.KeyVault                         Core,Desk {Add-AzKeyVaultCertificate, Add-AzKeyVau…
Script     2.4.0                 Az.Kusto                            Core,Desk {Add-AzKustoClusterCalloutPolicy, Add-Az…
Script     1.1.0                 Az.LoadTesting                      Core,Desk {Get-AzLoad, New-AzLoad, Remove-AzLoad, …
Script     1.6.0                 Az.LogicApp                         Core,Desk {Get-AzIntegrationAccount, Get-AzIntegra…
Script     1.2.0                 Az.MachineLearning                  Core,Desk {Add-AzMlWebServiceRegionalProperty, Exp…
Script     1.2.0                 Az.MachineLearningServices          Core,Desk {Get-AzMLServiceQuota, Get-AzMLServiceUs…
Script     1.5.1                 Az.Maintenance                      Core,Desk {Get-AzApplyUpdate, Get-AzConfigurationA…
Script     1.3.0                 Az.ManagedServiceIdentity           Core,Desk {Get-AzFederatedIdentityCredential, Get-…
Script     3.1.0                 Az.ManagedServices                  Core,Desk {Get-AzManagedServicesAssignment, Get-Az…
Script     2.1.0                 Az.MarketplaceOrdering              Core,Desk {Get-AzMarketplaceTerms, Invoke-AzMarket…
Script     1.2.0                 Az.Media                            Core,Desk {Get-AzMediaService, Get-AzMediaServiceK…
Script     2.7.0                 Az.Migrate                          Core,Desk {Get-AzMigrateDiscoveredServer, Get-AzMi…
Script     6.0.1                 Az.Monitor                          Core,Desk {Add-AzLogProfile, Add-AzMetricAlertRule…
Script     1.3.0                 Az.MySql                            Core,Desk {Get-AzMySqlConfiguration, Get-AzMySqlCo…
Script     7.14.0                Az.Network                          Core,Desk {Add-AzApplicationGatewayAuthenticationC…
Script     1.1.0                 Az.NetworkCloud                     Core,Desk {Deploy-AzNetworkCloudCluster, Disable-A…
Script     1.2.0                 Az.Nginx                            Core,Desk {Get-AzNginxCertificate, Get-AzNginxConf…
Script     1.2.0                 Az.NotificationHubs                 Core,Desk {Get-AzNotificationHub, Get-AzNotificati…
Script     3.3.0                 Az.OperationalInsights              Core,Desk {Disable-AzOperationalInsightsIISLogColl…
Script     1.1.0                 Az.Oracle                           Core,Desk {Add-AzOracleCloudVMClusterVM, Get-AzOra…
Script     1.7.1                 Az.PolicyInsights                   Core,Desk {Get-AzPolicyAttestation, Get-AzPolicyEv…
Script     1.2.0                 Az.PostgreSql                       Core,Desk {Get-AzPostgreSqlConfiguration, Get-AzPo…
Script     2.1.0                 Az.PowerBIEmbedded                  Core,Desk {Get-AzPowerBIEmbeddedCapacity, New-AzPo…
Script     1.2.0                 Az.PrivateDns                       Core,Desk {Add-AzPrivateDnsRecordConfig, Get-AzPri…
Script     7.5.1                 Az.RecoveryServices                 Core,Desk {Add-AzRecoveryServicesAsrReplicationPro…
Script     1.11.0                Az.RedisCache                       Core,Desk {Export-AzRedisCache, Get-AzRedisCache, …
Script     1.4.1                 Az.RedisEnterpriseCache             Core,Desk {Export-AzRedisEnterpriseCache, Get-AzRe…
Script     2.1.0                 Az.Relay                            Core,Desk {Get-AzRelayAuthorizationRule, Get-AzRel…
Script     1.2.0                 Az.ResourceGraph                    Core,Desk {Search-AzGraph, Get-AzResourceGraphQuer…
Script     1.3.0                 Az.ResourceMover                    Core,Desk {Add-AzResourceMoverMoveResource, Get-Az…
Script     7.9.0                 Az.Resources                        Core,Desk {Export-AzResourceGroup, Export-AzTempla…
Script     1.8.0                 Az.Security                         Core,Desk {Add-AzSecurityAdaptiveNetworkHardening,…
Script     3.2.0                 Az.SecurityInsights                 Core,Desk {Get-AzSentinelAlertRule, Get-AzSentinel…
Script     4.1.1                 Az.ServiceBus                       Core,Desk {New-AzServiceBusAuthorizationRuleSASTok…
Script     3.5.0                 Az.ServiceFabric                    Core,Desk {Add-AzServiceFabricClientCertificate, A…
Script     2.1.0                 Az.SignalR                          Core,Desk {Get-AzSignalR, Get-AzSignalRKey, Get-Az…
Script     6.0.2                 Az.Sql                              Core,Desk {Add-AzSqlDatabaseToFailoverGroup, Add-A…
Script     2.4.0                 Az.SqlVirtualMachine                Core,Desk {Assert-AzSqlVMEntraAuth, Get-AzAvailabi…
Script     2.5.0                 Az.StackHCI                         Core,Desk {Add-AzStackHCIVMAttestation, Disable-Az…
Script     1.1.0                 Az.StackHCIVM                       Core,Desk {Add-AzStackHCIVMVirtualMachineDataDisk,…
Script     8.2.0                 Az.Storage                          Core,Desk {Add-AzRmStorageContainerLegalHold, Add-…
Script     1.5.0                 Az.StorageMover                     Core,Desk {Get-AzStorageMover, Get-AzStorageMoverA…
Script     2.4.1                 Az.StorageSync                      Core,Desk {Get-AzStorageSyncCloudEndpoint, Get-AzS…
Script     2.1.0                 Az.StreamAnalytics                  Core,Desk {Get-AzStreamAnalyticsCluster, Get-AzStr…
Script     2.1.0                 Az.Support                          Core,Desk {Get-AzSupportChatTranscript, Get-AzSupp…
Script     3.1.2                 Az.Synapse                          Core,Desk {Add-AzSynapseDataFlowDebugSessionPackag…
Script     1.3.0                 Az.TrafficManager                   Core,Desk {Add-AzTrafficManagerCustomHeaderToEndpo…
Script     3.3.1                 Az.Websites                         Core,Desk {Add-AzWebAppAccessRestrictionRule, Add-…
Script     1.0.0                 Az.Workloads                        Core,Desk {Get-AzWorkloadsMonitor, Get-AzWorkloads…

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     3.0.2                 Az.Accounts                         Core,Desk {Disable-AzDataCollection, Disable-AzCon…
Script     7.1.0                 Az.Storage                          Core,Desk {Add-AzRmStorageContainerLegalHold, Add-…

lubyou avatar Apr 10 '25 09:04 lubyou