AzureFilesのパラメータを更新するために、Az.storage モジュールのバージョンをアップデートする必要があったものの、いくら『Update-Module -Name Az』を実行してもアップデートされない・・・という状況に出くわし調べた内容を備忘録として残します。
Az PowerShell モジュールを更新(アップデート)できない
インストール時にMSIパッケージを使用した場合はアップデートの際もMSIパッケージを使用する必要があるらしい。
PowerShell モジュールを更新するには、モジュールのインストールに使用したのと同じ方法を使用する必要があります。たとえば、もともと Install-Module を使用していた場合は、Update-Module を使用して最新バージョンを取得する必要があります。最初に MSI パッケージを使用した場合は、新しい MSI パッケージをダウンロードしてインストールする必要があります。
PowerShellGet コマンドレットは、MSI パッケージからインストールされたモジュールを更新できません。 MSI パッケージは、PowerShellGet を使用してインストールされたモジュールを更新しません。 PowerShellGet を使用した更新で問題が発生した場合は、更新するのではなく、再インストールする必要があります。再インストールは、インストールと同じ方法で行います。再インストールするときは、Install-Module で Force パラメーターを使用してください。
MSI ベースのインストールとは異なり、PowerShellGet を使用してインストールまたは更新しても、システムに存在する古いバージョンは削除されません。
注意
複数のバージョンの Az PowerShell モジュールがインストールされている場合、アンインストールは複雑になる可能性があります。この複雑さのため、現在インストールされている Az PowerShell モジュールのすべてのバージョンのアンインストールのみがサポートされています。
これを読むとMSIでインストールしておいたほうが無難かもしれませんね。
ちなみに、Azure PowerShellをインストールする手順は以下。
https://learn.microsoft.com/ja-jp/powershell/azure/install-az-ps-msi?view=azps-9.1.0
※Windows PowerShell 5.1 と .NET Framework 4.7.2 以降が必要
MSIパッケージは以下のgithubで公開されています。
https://github.com/Azure/azure-powershell/releases
任意のバージョンのMSIパッケージ(Az-Cmdlets-9.1.1.36578-x64.msi など)をダウンロードしてきてインストールしたいマシンで実行する。
アップデートしたい場合も同様に新しいバージョンのMSIをダウンロードしてきて実行する。
インストールが完了したら以下のコマンドで確認が可能です。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
PS> Get-InstalledModule -Name Az* Version Name Repository Description ------- ---- ---------- ----------- 0.5.4 Azure.AnalysisServices PSGallery Microsoft Azure PowerShell - Analysis Services server management 4.6.1 Azure.Storage PSGallery Microsoft Azure PowerShell - Storage service cmdlets. Manages blobs, queues, tables and files in Microsoft Azure storage accounts 6.13.1 AzureRM PSGallery Azure Resource Manager Module 0.6.14 AzureRM.AnalysisServices PSGallery Microsoft Azure PowerShell - Analysis Services 6.1.7 AzureRM.ApiManagement PSGallery Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager 0.1.8 AzureRM.ApplicationInsights PSGallery Microsoft Azure PowerShell - Application Insights service management cmdlets for Azure Resource Manager. Creates and manages application insights in Azure Resource Manager. 6.1.1 AzureRM.Automation PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager 4.0.11 AzureRM.Backup PSGallery Microsoft Azure PowerShell - Azure Backup service cmdlets for Azure Resource Manager 4.1.5 AzureRM.Batch PSGallery Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager 0.14.6 AzureRM.Billing PSGallery Microsoft Azure PowerShell - Billing service cmdlets for Azure Resource Manager 5.0.6 AzureRM.Cdn PSGallery Microsoft Azure PowerShell - CDN service cmdlets for Azure Resource Manager 0.9.12 AzureRM.CognitiveServices PSGallery Microsoft Azure PowerShell - Cognitive Services management cmdlets for Azure Resource Manager. Creates and manages cognitive services accounts in Azure Resource Manager. 5.9.1 AzureRM.Compute PSGallery Microsoft Azure PowerShell - Compute service cmdlets for Azure Resource Manager. Manages virtual machines, hosted services, and related resources in Azure Resource Manager 0.3.7 AzureRM.Consumption PSGallery Microsoft Azure PowerShell - Consumption service cmdlets for Azure Resource Manager 0.2.12 AzureRM.ContainerInstance PSGallery Microsoft Azure PowerShell - Container Instance cmdlets for Azure Resource Manager 1.0.10 AzureRM.ContainerRegistry PSGallery Microsoft Azure PowerShell - ContainerRegistry service cmdlets for Azure Resource Manager 5.0.3 AzureRM.DataFactories PSGallery Microsoft Azure PowerShell - DataFactories service cmdlets for Azure Resource Manager 0.5.11 AzureRM.DataFactoryV2 PSGallery Microsoft Azure PowerShell - DataFactories service cmdlets for Azure Resource Manager 5.1.4 AzureRM.DataLakeAnalytics PSGallery Microsoft Azure PowerShell - Data Lake Analytics 6.2.1 AzureRM.DataLakeStore PSGallery Microsoft Azure PowerShell - Data Lake Store 4.0.9 AzureRM.DevTestLabs PSGallery Microsoft Azure PowerShell - DevTestLabs service cmdlets for Azure Resource Manager 5.1.0 AzureRM.Dns PSGallery Microsoft Azure PowerShell - Dns service cmdlets for Azure Resource Manager 0.3.7 AzureRM.EventGrid PSGallery Microsoft Azure PowerShell - EventGrid service cmdlets for Azure Resource Manager 0.7.0 AzureRM.EventHub PSGallery Microsoft Azure PowerShell - EventHubs service cmdlets for Azure Resource Manager 4.1.8 AzureRM.HDInsight PSGallery Microsoft Azure PowerShell - HDInsight service cmdlets for Azure Resource Manager 5.1.5 AzureRM.Insights PSGallery Microsoft Azure PowerShell - Insights service cmdlets for Azure Resource Manager 3.1.8 AzureRM.IotHub PSGallery Microsoft Azure PowerShell - IotHub service cmdlets for Azure Resource Manager 5.2.1 AzureRM.KeyVault PSGallery Microsoft Azure PowerShell - KeyVault service cmdlets for Azure Resource Manager 4.1.4 AzureRM.LogicApp PSGallery Microsoft Azure PowerShell - LogicApp cmdlets for Azure Resource Manager 0.18.5 AzureRM.MachineLearning PSGallery Microsoft Azure PowerShell - Machine Learning Web Services cmdlets for Azure Resource Manager 0.4.8 AzureRM.MachineLearningCompute PSGallery Microsoft Azure PowerShell - Machine Learning Compute cmdlets for Azure Resource Manager 0.2.7 AzureRM.MarketplaceOrdering PSGallery Microsoft Azure PowerShell - MarketplaceOrdering agreements service cmdlets for Azure Resource Manager 0.10.4 AzureRM.Media PSGallery Microsoft Azure PowerShell - Media service cmdlets for Azure Resource Manager 6.11.1 AzureRM.Network PSGallery Microsoft Azure PowerShell - Network service cmdlets for Azure Resource Manager 5.0.3 AzureRM.NotificationHubs PSGallery Microsoft Azure PowerShell - NotificationHubs 5.0.6 AzureRM.OperationalInsights PSGallery Microsoft Azure PowerShell - OperationalInsights service cmdlets for Azure Resource Manager 1.1.0 AzureRM.PolicyInsights PSGallery Microsoft Azure PowerShell - Azure Policy Insights cmdlets. Allows querying policy evaluation events and compliance states. 4.1.10 AzureRM.PowerBIEmbedded PSGallery Microsoft Azure PowerShell - Power BI Embedded service management cmdlets for Azure Resource Manager. Creates and manages Power BI Embedded workspace collections and Power BI Dedicated Capacities in Azure Resource Manager. 5.8.2 AzureRM.profile PSGallery Microsoft Azure PowerShell - Profile credential management cmdlets for Azure Resource Manager 4.1.9 AzureRM.RecoveryServices PSGallery Microsoft Azure PowerShell - RecoveryServices cmdlets for Azure Resource Manager 4.5.2 AzureRM.RecoveryServices.Backup PSGallery Microsoft Azure PowerShell - Azure Backup service cmdlets for Azure Resource Manager 0.2.12 AzureRM.RecoveryServices.SiteRec... PSGallery Microsoft Azure PowerShell - SiteRecovery service cmdlets for Azure Resource Manager 5.1.0 AzureRM.RedisCache PSGallery Microsoft Azure PowerShell - RedisCache service cmdlets for Azure Resource Manager 0.3.12 AzureRM.Relay PSGallery Microsoft Azure PowerShell - Relay service cmdlets for Azure Resource Manager 6.7.3 AzureRM.Resources PSGallery Microsoft Azure PowerShell - Azure Resource Manager cmdlets. Manages subscriptions, tenants, resource groups, deployment templates, providers, and resource permissions in Azure Resource Manager. Provides cmdlets for managing resources generically across resource providers. 0.16.10 AzureRM.Scheduler PSGallery Microsoft Azure PowerShell - Scheduler cmdlets for Azure Resource Manager 0.6.13 AzureRM.ServiceBus PSGallery Microsoft Azure PowerShell - ServiceBus service cmdlets for Azure Resource Manager 0.3.15 AzureRM.ServiceFabric PSGallery Microsoft Azure PowerShell - Service Fabric cmdlets for Azure Resource Manager 1.0.0 AzureRM.SignalR PSGallery Microsoft Azure PowerShell - Azure SignalR service commands 4.12.1 AzureRM.Sql PSGallery Microsoft Azure PowerShell - Sql service cmdlets for Azure Resource Manager 5.2.0 AzureRM.Storage PSGallery Microsoft Azure PowerShell - Storage service management cmdlets for Azure Resource Manager. Creates and manages storage accounts in Azure Resource Manager. 4.0.10 AzureRM.StreamAnalytics PSGallery Microsoft Azure PowerShell - StreamAnalytics service cmdlets for Azure Resource Manager 4.0.5 AzureRM.Tags PSGallery Microsoft Azure PowerShell - Tags service cmdlets for Azure Resource Manager 4.1.3 AzureRM.TrafficManager PSGallery Microsoft Azure PowerShell - TrafficManager service cmdlets for Azure Resource Manager 4.0.5 AzureRM.UsageAggregates PSGallery Microsoft Azure PowerShell - UsageAggregates service cmdlets for Azure Resource Manager 5.2.0 AzureRM.Websites PSGallery Microsoft Azure PowerShell - Websites service cmdlets for Azure Resource Manager 6.4.0 Az PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell.... 2.5.3 Az.Accounts PSGallery Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.1 Az.Advisor PSGallery Microsoft Azure PowerShell - Azure Advisor Cmdlets for Advisor in Windows PowerShell and PowerShell Core. Get Advisor recommendations, Manage Advisor configurations. 2.4.0 Az.Aks PSGallery Microsoft Azure PowerShell - Azure managed Kubernetes cmdlets for Windows PowerShell and PowerShell Core.... 1.1.4 Az.AnalysisServices PSGallery Microsoft Azure PowerShell - Analysis Services cmdlets for Windows PowerShell and PowerShell Core.... 2.3.0 Az.ApiManagement PSGallery Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.0.0 Az.AppConfiguration PSGallery Microsoft Azure PowerShell: AppConfiguration cmdlets 1.2.0 Az.ApplicationInsights PSGallery Microsoft Azure PowerShell - Application Insights management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages application insights in Azure Resource Manager.... 1.7.1 Az.Automation PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 3.1.0 Az.Batch PSGallery Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.0.0 Az.Billing PSGallery Microsoft Azure PowerShell - Billing service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.8.0 Az.Cdn PSGallery Microsoft Azure PowerShell - CDN service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.9.0 Az.CognitiveServices PSGallery Microsoft Azure PowerShell - Cognitive Services management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages cognitive services accounts in Azure Resource Manager.... 4.17.0 Az.Compute PSGallery Microsoft Azure PowerShell - Compute service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Manages virtual machines, hosted services, and related resources in Azure Resource Manager.... 2.1.0 Az.ContainerInstance PSGallery Microsoft Azure PowerShell: ContainerInstance cmdlets 2.2.3 Az.ContainerRegistry PSGallery Microsoft Azure PowerShell - Container Registry service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.3.1 Az.CosmosDB PSGallery Microsoft Azure PowerShell - CosmosDB service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.0 Az.DataBoxEdge PSGallery Microsoft Azure PowerShell - DataBoxEdge service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.0 Az.Databricks PSGallery Microsoft Azure PowerShell: Databricks cmdlets 1.14.0 Az.DataFactory PSGallery Microsoft Azure PowerShell - Data Factory service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.0.2 Az.DataLakeAnalytics PSGallery Microsoft Azure PowerShell - Data Lake Analytics in Windows PowerShell and PowerShell Core.... 1.3.0 Az.DataLakeStore PSGallery Microsoft Azure PowerShell - Azure Data Lake Store cmdlets in Windows PowerShell and PowerShell Core.... 1.0.0 Az.DataShare PSGallery Microsoft Azure PowerShell - DataShare service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. 1.1.0 Az.DeploymentManager PSGallery PowerShell .Net Core Microsoft Azure PowerShell - Deployment Manager cmdlets for Azure Resource Manager.... 3.0.0 Az.DesktopVirtualization PSGallery Microsoft Azure PowerShell: DesktopVirtualization cmdlets 1.0.2 Az.DevTestLabs PSGallery Microsoft Azure PowerShell - DevTest Labs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.2 Az.Dns PSGallery Microsoft Azure PowerShell - DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.3.0 Az.EventGrid PSGallery Microsoft Azure PowerShell - Event Grid service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.8.0 Az.EventHub PSGallery Microsoft Azure PowerShell - Event Hubs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.8.0 Az.FrontDoor PSGallery Microsoft Azure PowerShell - Front Door service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 3.1.0 Az.Functions PSGallery Microsoft Azure PowerShell - Azure Functions service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 4.3.0 Az.HDInsight PSGallery Microsoft Azure PowerShell - HDInsight service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.3.1 Az.HealthcareApis PSGallery Microsoft Azure PowerShell - HealthcareApis management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages HealthcareApis service accounts in Azure Resource Manager.... 2.7.3 Az.IotHub PSGallery Microsoft Azure PowerShell - IoT Hub service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 3.5.0 Az.KeyVault PSGallery Microsoft Azure PowerShell - Key Vault service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.0.0 Az.Kusto PSGallery Microsoft Azure PowerShell: Kusto cmdlets 1.5.0 Az.LogicApp PSGallery Microsoft Azure PowerShell - Logic Apps cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.3 Az.MachineLearning PSGallery Microsoft Azure PowerShell - Machine Learning Web Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.1 Az.Maintenance PSGallery Microsoft Azure PowerShell - Maintenance cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.0.0 Az.ManagedServices PSGallery Microsoft Azure PowerShell - ManagedServices cmdlets for Azure Resource Manager 1.0.2 Az.MarketplaceOrdering PSGallery Microsoft Azure PowerShell - Marketplace Ordering agreements service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.1 Az.Media PSGallery Microsoft Azure PowerShell - Media service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.1 Az.Migrate PSGallery Microsoft Azure PowerShell: Migrate cmdlets 2.7.0 Az.Monitor PSGallery Microsoft Azure PowerShell - Monitor service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 4.11.0 Az.Network PSGallery Microsoft Azure PowerShell - Networking service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.1 Az.NotificationHubs PSGallery Microsoft Azure PowerShell - Notification Hubs cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.3.0 Az.OperationalInsights PSGallery Microsoft Azure PowerShell - Operational Insights service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. 1.4.1 Az.PolicyInsights PSGallery Microsoft Azure PowerShell - Azure Policy Insights cmdlets for Windows PowerShell and PowerShell Core. Allows querying policy evaluation events and compliance states.... 1.1.2 Az.PowerBIEmbedded PSGallery Microsoft Azure PowerShell - Power BI Embedded service management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages Power BI Embedded workspace collections and Power BI Dedicated Capacities in Azure Resource Manager.... 1.0.3 Az.PrivateDns PSGallery Microsoft Azure PowerShell - Private DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 4.6.0 Az.RecoveryServices PSGallery Microsoft Azure PowerShell - Recovery Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.5.0 Az.RedisCache PSGallery Microsoft Azure PowerShell - Redis Cache service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.0.0 Az.RedisEnterpriseCache PSGallery Microsoft Azure PowerShell: RedisEnterpriseCache cmdlets 1.0.3 Az.Relay PSGallery Microsoft Azure PowerShell - Relay service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.0.0 Az.ResourceMover PSGallery Microsoft Azure PowerShell: ResourceMover cmdlets 4.3.1 Az.Resources PSGallery Microsoft Azure PowerShell - Azure Resource Manager and Active Directory cmdlets in Windows PowerShell and PowerShell Core. Manages subscriptions, tenants, resource groups, deployment templates, providers, and resource permissions in Azure Resource Manager. Provides cmdlets for managing resources generically across resource providers.... 1.0.0 Az.Security PSGallery Microsoft Azure PowerShell - Azure Security Center cmdlets in Windows PowerShell and PowerShell Core. Allows managing and monitoring the security posture of your resources.... 1.1.0 Az.SecurityInsights PSGallery Microsoft Azure PowerShell - Azure Sentinel cmdlets in Windows PowerShell and PowerShell Core. Allows managing and monitoring the security posture of your resources.... 1.5.0 Az.ServiceBus PSGallery Microsoft Azure PowerShell - Service Bus service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 3.0.1 Az.ServiceFabric PSGallery Microsoft Azure PowerShell - Service Fabric cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.3.0 Az.SignalR PSGallery Microsoft Azure PowerShell - Azure SignalR service commands for Windows PowerShell and PowerShell Core.... 3.5.0 Az.Sql PSGallery Microsoft Azure PowerShell - SQL service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 1.1.0 Az.SqlVirtualMachine PSGallery Microsoft Azure PowerShell - SqlVirtualMachine service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. 3.11.0 Az.Storage PSGallery Microsoft Azure PowerShell - Storage service data plane and management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages storage accounts in Azure Resource Manager.... 1.6.0 Az.StorageSync PSGallery Microsoft Azure PowerShell - Storage Sync cmdlets in Windows PowerShell and PowerShell Core. Manages operations pertaining to Azure File Sync in PowerShell. 2.0.0 Az.StreamAnalytics PSGallery Microsoft Azure PowerShell: StreamAnalytics cmdlets 1.0.0 Az.Support PSGallery Microsoft Azure PowerShell - Azure Support cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. 1.0.4 Az.TrafficManager PSGallery Microsoft Azure PowerShell - Traffic Manager service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.8.2 Az.Websites PSGallery Microsoft Azure PowerShell - App Service (Web Apps) service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.... 2.0.2.140 AzureAD PSGallery Azure Active Directory V2 General Availability Module.... |
では。