diff --git a/README.md b/README.md index 1a5369247b63..4d4811d81cfc 100644 --- a/README.md +++ b/README.md @@ -9,128 +9,57 @@ This repository contains a set of PowerShell cmdlets for developers and administ ## Features -* Account - * Get and import Azure publish settings - * Login with Microsoft account or Organizational account through Microsoft Azure Active Directory +* Account management + * Login with Microsoft account, Organizational account, or Service Principal through Microsoft Azure Active Directory + * Save Credentials to disk with Save-AzureRmProfile and load saved credentials using Select-AzureRmProfile * Environment * Get the different out-of-box Microsoft Azure environments - * Add/Set/Remove customized environments (like your Windows Azure Pack environments) - * Get Azure publish settings for a particular environment -* Subscription - * Manage Azure subscription - * Manage AffinityGroup -* Website - * Manage website, such as CRUD, start and stop. - * Manage slot - * Manage WebJob - * Deploy project via WebDeploy - * Diagnostics - * Configure site and application diagnostics - * Log streaming - * Save log -* Cloud Services - * Create scaffolding for cloud service and role. Role support includes Node.js and PHP. - * Manage cloud service and role, such as CRUD, start and stop. - * Manage extension. - * Start/Stop Azure emulator. - * Manage certificate. - * Manage cloud service extensions - * Remote desktop - * Diagnostics - * Microsoft Antimalware - * Windows Azure Diagnostics -* Storage - * Manage storage account and access key. - * Manage storage container and blob, with paging. - * Copy storage blob. - * Manage storage table. - * Manage storage queue. - * Create SAS token. - * Manage metrics and logging. - * Configure timeout -* SQL Database - * CRUD support for database server, database and firewall rule. - * Get database server quota. - * Get/Set database server service objective. - * Manage database copies and active geo-replication. - * Get dropped databases that can be restored. - * Issue requests to restore a live or dropped database to a point in time. - * Issue requests to recover a database from an unavailable database server. - * Manage database and database server auditing policy. -* Service Bus - * Manage service bus namespaces. -* VM - * Manage VM, such as CRUD, import/export and start/stop/restart. - * Manage VM image and VM image disks. - * Manage disk, such as CRUD. - * Manage VM endpoint, such as CRUD and ACL. - * Get/Set VM sub net. - * Manage certificate and SSH key. - * PowerShell remoting - * Manage extension - * BG Info - * Chef - * Puppet - * Custom Script - * Access - * Microsoft Antimalware - * PowerShell DSC - * Windows Azure Diagnostics - * Public IP, reserved IP and internal load balancer -* Deployment - * Manage deployment, such as CRUD, move, upgrade and restore. - * Get/Create DNS settings of a deployment. -* VNet - * Manage virtual network config, connection and gateway. - * Manage static IP -* Azure Media Services - * Create, read and delete Media Services Accounts - * Generate new account keys for Media Services Accounts -* HDInsight - * Manage clusters, such as CRUD, add/set storage - * Manage jobs, such as CRUD, start/stop/wait/invoke - * Manage HTTP service access. such as grant/revoke -* Store - * View available Microsoft Azure Store Add-On plans. - * Purchase, view, upgrade and remove Microsoft Azure Store Add-On instances. -* Utility - * Test whether a name is available. Currently support cloud service name, storage account name and service bus namespace name. - * Get the list of geo locations supported by Azure. - * Get the list of OS supported by Azure. - * Direct you to Azure portal. + * Add/Set/Remove customized environments (like your Azure Stack or Windows Azure Pack environments) +* Management and data plane cmdlets for Azure services in ARM and RDFE + * VM + * Storage + * Network + * App Service (Websites) + * SQL Database + * KeyVault + * Operational Insights + * Automation + * Batch + * Backup + * RecoveryServices and SiteRecovery + * Stream Analytics + * Traffic Manager + * DataFactories + * DNS + * HDInsight + * Express Route + * Scheduler + * StorSimple + * Redis Cache + * Windows Azure Pack * Web Site: CRUD web site, deployment, configure and get log, start/stop/restart/show web site * Service Bus: CRD namespace * VM: CRUD VM, get OS disk, size profile and VM template, start/stop/restart/suspend/resume VM * VNET: CRUD VNET and subnet. * Cloud Service: CRUD cloud service. -* ExpressRoute - * Manage dedicated circuit - * Manage BGP peering -* Scheduler - * Manage job collections - * Manage HTTP and storage queue jobs -* Resource Manager - * Manage resource groups and deployments - * Query and download gallery templates - * Manage individual resources -* Traffic Manager - * Manage profiles and endpoints -* Azure Automation - * Manage automation accounts - * Manage automation jobs, runbooks and schedules +* Windows Azure Stack + * Azure Stack Administration + * Storage Servcie Management + For detail descriptions and examples of the cmdlets, type * ```help azure``` to get all the cmdlets. -* ```help node-dev``` to get all Node.js development related cmdlets. -* ```help php-dev``` to get all PHP development related cmdlets. +* ```help azurerm``` to get all the Azure Resource Manaber (ARM) cmdlets. * ```help ``` to get the details of a specific cmdlet. ## Supported Environments * [Microsoft Azure](http://www.azure.microsoft.com) +* [Azure Stack](https://azure.microsoft.com/en-us/overview/azure-stack/) * [Windows Azure Pack](http://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx) * [Microsoft Azure China](http://www.windowsazure.cn/) +* [USGovernment](https://azure.microsoft.com/en-us/features/gov/) ## Installation @@ -142,6 +71,12 @@ For detail descriptions and examples of the cmdlets, type You can also find the standalone installers for all the versions at [Downloads](https://github.com/Azure/azure-powershell/releases) +### PowerShell Gallery +1. Install [Windows Management Framework 5 ot PowerShellGet cmdlets](https://www.powershellgallery.com/GettingStarted?section=Get%20Started) +2. In an elevated PowerShell session, run ```Install-Module AzureRM``` +3. run ```Install-AzureRm``` +4. Top install RDFE cmdlets, run ```Install-Module Azure``` + ### Source Code 1. Download the source code from GitHub repo @@ -149,11 +84,9 @@ You can also find the standalone installers for all the versions at [Downloads]( ### Supported PowerShell Versions -* 0.6.9 or lower - * [Windows PowerShell 2.0](http://technet.microsoft.com/en-us/scriptcenter/dd742419) - * [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595) -* 0.6.10 to higher - * [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595) +* [Windows Management Framework 3] (http://www.microsoft.com/en-us/download/details.aspx?id=34595) +* [Windows Management Framework 4] (https://www.microsoft.com/en-us/download/details.aspx?id=40855) +* [Windows Management Framework 5] (https://www.microsoft.com/en-us/download/details.aspx?id=50395) ## Get Started @@ -161,8 +94,8 @@ In general, following are the steps to start using Microsoft Azure PowerShell * Get yourself authenticated with Microsoft Azure. For details, please check out [this article](http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). * Option 1: Login with your Microsoft account or Organizational account directly from PowerShell. Microsoft Azure Active Directory authentication is used in this case. No management certificate is needed. - * Starting from 0.8.6, you can use ``Add-AzureAccount -Credential`` to avoid the browser pop up for Organizational account. - * Option 2: Download and import a publish settings file which contains a management certificate. + * Starting from 1.0.0, you can use ```Add-AzureRmAccount -Credential``` to avoid the browser pop up for Organizational account. + * To use RDFE cmdlets, use ```Add-AzureAccount``` * Use the cmdlets The first step can be different for different environment you are targeting. Following are detail instructions for each supported environment. @@ -175,46 +108,19 @@ If you use both mechanisms on the same subscription, Microsoft Azure Active Dire ```powershell # Pop up an embedded browser control for you to login -Add-AzureAccount +Add-AzureRmAccount # use the cmdlets to manage your services/applications -New-AzureWebsite -Name mywebsite -Location "West US" -``` - -#### Use publish settings file (Management certificate authentication) - -```powershell -# Download a file which contains the publish settings information of your subscription. -# This will open a browser window and ask you to log in to get the file. -Get-AzurePublishSettingsFile - -# Import the file you just downloaded. -# Notice that the file contains credential of your subscription so you don't want to make it public -# (like check in to source control, etc.). -Import-AzurePublishSettingsFile "" - -# Use the cmdlets to manage your services/applications -New-AzureWebsite -Name mywebsite -Location "West US" +New-AzureRmResourceGroup -Name myresourceGroup -Location "West US" ``` ### Microsoft Azure China ```powershell -# Check the environment supported by your Microsoft Azure PowerShell installation. -Get-AzureEnvironment - -# Download a file which contains the publish settings information of your subscription. -# Use the -Environment parameter to target Microsoft Azure China. -# This will open a browser window and ask you to log in to get the file. -Get-AzurePublishSettingsFile -Environment "AzureChinaCloud" +Add-AzureRmAccount -EnvironmentName AzureChinaCloud -# Import the file you just downloaded. -# Notice that the file contains credential of your subscription so you don't want to make it public -# (like check in to source control, etc.). -Import-AzurePublishSettingsFile "" - -# Use the cmdlets to manage your services/applications -New-AzureWebsite -Name mywebsite -Location "China East" +# use the cmdlets to manage your services/applications +New-AzureRmResourceGroup -Name myresourceGroup -Location "Chine East" ``` ### Windows Azure Pack @@ -245,35 +151,21 @@ Import-WAPackPublishSettingsFile "" # Use the cmdlets to manage your services/applications New-WAPackWebsite -Name mywebsite ``` -## 2 Modes - -Starting from 0.8.0, we are adding a separate mode for Resource Manager. You can use the following cmdlet to switch between the - -* Service management: cmdlets using the Azure service management API -* Resource manager: cmdlets using the Azure Resource Manager API - -They are not designed to work together. - -```powershell -Switch-AzureMode AzureServiceManagement -Switch-AzureMode AzureResourceManager -``` ## Find Your Way All the cmdlets can be put into 3 categories: -1. Cmdlets support both Microsoft Azure and Windows Azure Pack -2. Cmdlets only support both Microsoft Azure -3. Cmdlets only support Windows Azure Pack +1. ARM management cmdlets use the noun 'AzureRm' (New-AzureRmResourceGroup, Get-AzureRmVM) +2. Legacy RDFE management cmdlets use the noun 'Azure' (Get-AzureVM) +3. Data plane cmdlets that work in ARM or RDFE use the noun Azure (Get-AzureBlob) -* For category 1, we are using an "Azure" prefix in the cmdlet name and adding an alias with "WAPack" prefix. -* For category 2, we are using an "Azure" prefix in the cmdlet name. -* For category 2, we are using an "WAPack" prefix in the cmdlet name. So you can use the following cmdlet to find out all the cmdlets for your environment ```powershell +# Return all the cmdlets for Azure Resource Manager (ARM) +Get-Command *AzureRm* # Return all the cmdlets for Microsoft Azure Get-Command *Azure* diff --git a/build.proj b/build.proj index 0dff01d87f12..ae1feb5faba9 100644 --- a/build.proj +++ b/build.proj @@ -203,8 +203,6 @@ - @@ -258,8 +256,6 @@ - diff --git a/src/Common/Commands.Common/AzurePowerShell.cs b/src/Common/Commands.Common/AzurePowerShell.cs index 96d80f1b46fe..0610bf15f683 100644 --- a/src/Common/Commands.Common/AzurePowerShell.cs +++ b/src/Common/Commands.Common/AzurePowerShell.cs @@ -26,9 +26,9 @@ public class AzurePowerShell public const string AssemblyCopyright = "Copyright © Microsoft"; - public const string AssemblyVersion = "1.0.0"; + public const string AssemblyVersion = "1.0.5"; - public const string AssemblyFileVersion = "1.0.4"; + public const string AssemblyFileVersion = "1.0.5"; public const string ProfileFile = "AzureProfile.json"; diff --git a/src/Common/Storage/Azure.Storage.psd1 b/src/Common/Storage/Azure.Storage.psd1 index 11e86ba81dd9..3d12c2785465 100644 --- a/src/Common/Storage/Azure.Storage.psd1 +++ b/src/Common/Storage/Azure.Storage.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1 b/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1 index e6d8d97586cd..627b98a81152 100644 --- a/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1 +++ b/src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Automation/AzureRM.Automation.psd1 b/src/ResourceManager/Automation/AzureRM.Automation.psd1 index e3911c126bf1..f3dab229fc07 100644 --- a/src/ResourceManager/Automation/AzureRM.Automation.psd1 +++ b/src/ResourceManager/Automation/AzureRM.Automation.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1 b/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1 index 56fd0e5e3098..d0aa8ca47883 100644 --- a/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1 +++ b/src/ResourceManager/AzureBackup/AzureRM.Backup.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 b/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 index ba5640504fe7..780c3602278a 100644 --- a/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 +++ b/src/ResourceManager/AzureBatch/AzureRM.Batch.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/AzureStackAdmin/AzureRM.AzureStackAdmin.psd1 b/src/ResourceManager/AzureStackAdmin/AzureRM.AzureStackAdmin.psd1 index 0d86501b0e7d..1eeb878e6b4e 100644 --- a/src/ResourceManager/AzureStackAdmin/AzureRM.AzureStackAdmin.psd1 +++ b/src/ResourceManager/AzureStackAdmin/AzureRM.AzureStackAdmin.psd1 @@ -48,7 +48,7 @@ CLRVersion = '4.0' ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.4'}) # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() diff --git a/src/ResourceManager/AzureStackStorage/AzureRM.AzureStackStorage.psd1 b/src/ResourceManager/AzureStackStorage/AzureRM.AzureStackStorage.psd1 index 183974514663..521ee58c2df9 100644 --- a/src/ResourceManager/AzureStackStorage/AzureRM.AzureStackStorage.psd1 +++ b/src/ResourceManager/AzureStackStorage/AzureRM.AzureStackStorage.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.4'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.4'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Compute/AzureRM.Compute.psd1 b/src/ResourceManager/Compute/AzureRM.Compute.psd1 index c0048fb3eefb..69385352aeae 100644 --- a/src/ResourceManager/Compute/AzureRM.Compute.psd1 +++ b/src/ResourceManager/Compute/AzureRM.Compute.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/DataFactories/AzureRM.DataFactories.psd1 b/src/ResourceManager/DataFactories/AzureRM.DataFactories.psd1 index b7fb5cac4843..070d98bed2c8 100644 --- a/src/ResourceManager/DataFactories/AzureRM.DataFactories.psd1 +++ b/src/ResourceManager/DataFactories/AzureRM.DataFactories.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/DataLakeAnalytics/AzureRM.DataLakeAnalytics.psd1 b/src/ResourceManager/DataLakeAnalytics/AzureRM.DataLakeAnalytics.psd1 index c12bcdd525d3..b12229ba7687 100644 --- a/src/ResourceManager/DataLakeAnalytics/AzureRM.DataLakeAnalytics.psd1 +++ b/src/ResourceManager/DataLakeAnalytics/AzureRM.DataLakeAnalytics.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5' }) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5' }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/DataLakeStore/AzureRM.DataLakeStore.psd1 b/src/ResourceManager/DataLakeStore/AzureRM.DataLakeStore.psd1 index 6114c6c1a1d6..3d7f9522bbb7 100644 --- a/src/ResourceManager/DataLakeStore/AzureRM.DataLakeStore.psd1 +++ b/src/ResourceManager/DataLakeStore/AzureRM.DataLakeStore.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5' }) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5' }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Dns/AzureRM.Dns.psd1 b/src/ResourceManager/Dns/AzureRM.Dns.psd1 index 6d91df361049..fac1ca7c0eaf 100644 --- a/src/ResourceManager/Dns/AzureRM.Dns.psd1 +++ b/src/ResourceManager/Dns/AzureRM.Dns.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/HDInsight/AzureRM.HDInsight.psd1 b/src/ResourceManager/HDInsight/AzureRM.HDInsight.psd1 index c98ff2ff95b4..167b01feda40 100644 --- a/src/ResourceManager/HDInsight/AzureRM.HDInsight.psd1 +++ b/src/ResourceManager/HDInsight/AzureRM.HDInsight.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Insights/AzureRM.Insights.psd1 b/src/ResourceManager/Insights/AzureRM.Insights.psd1 index 85a521d1b431..1cf78d7d5531 100644 --- a/src/ResourceManager/Insights/AzureRM.Insights.psd1 +++ b/src/ResourceManager/Insights/AzureRM.Insights.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Intune/AzureRM.Intune.psd1 b/src/ResourceManager/Intune/AzureRM.Intune.psd1 index e186dfa9fa94..23a3270a237b 100644 --- a/src/ResourceManager/Intune/AzureRM.Intune.psd1 +++ b/src/ResourceManager/Intune/AzureRM.Intune.psd1 @@ -48,7 +48,7 @@ CLRVersion='4.0' # ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() diff --git a/src/ResourceManager/KeyVault/AzureRM.KeyVault.psd1 b/src/ResourceManager/KeyVault/AzureRM.KeyVault.psd1 index 9956d573fdb6..2dcbfe897ec4 100644 --- a/src/ResourceManager/KeyVault/AzureRM.KeyVault.psd1 +++ b/src/ResourceManager/KeyVault/AzureRM.KeyVault.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/LogicApp/AzureRM.LogicApp.psd1 b/src/ResourceManager/LogicApp/AzureRM.LogicApp.psd1 index cfcd0e428410..76b27b3ed3de 100644 --- a/src/ResourceManager/LogicApp/AzureRM.LogicApp.psd1 +++ b/src/ResourceManager/LogicApp/AzureRM.LogicApp.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'} ) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'} ) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Network/AzureRM.Network.psd1 b/src/ResourceManager/Network/AzureRM.Network.psd1 index 682e7b720275..390bef251567 100644 --- a/src/ResourceManager/Network/AzureRM.Network.psd1 +++ b/src/ResourceManager/Network/AzureRM.Network.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/NotificationHubs/AzureRM.NotificationHubs.psd1 b/src/ResourceManager/NotificationHubs/AzureRM.NotificationHubs.psd1 index 0db8f59423a5..a38265b8a6b6 100644 --- a/src/ResourceManager/NotificationHubs/AzureRM.NotificationHubs.psd1 +++ b/src/ResourceManager/NotificationHubs/AzureRM.NotificationHubs.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5' }) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5' }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/OperationalInsights/AzureRM.OperationalInsights.psd1 b/src/ResourceManager/OperationalInsights/AzureRM.OperationalInsights.psd1 index d5ac77c01624..792a58c8d045 100644 --- a/src/ResourceManager/OperationalInsights/AzureRM.OperationalInsights.psd1 +++ b/src/ResourceManager/OperationalInsights/AzureRM.OperationalInsights.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/RecoveryServices/AzureRM.RecoveryServices.psd1 b/src/ResourceManager/RecoveryServices/AzureRM.RecoveryServices.psd1 index 85284fc32e4c..23d35b87680e 100644 --- a/src/ResourceManager/RecoveryServices/AzureRM.RecoveryServices.psd1 +++ b/src/ResourceManager/RecoveryServices/AzureRM.RecoveryServices.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/RedisCache/AzureRM.RedisCache.psd1 b/src/ResourceManager/RedisCache/AzureRM.RedisCache.psd1 index e2c7d296d957..450f674e511a 100644 --- a/src/ResourceManager/RedisCache/AzureRM.RedisCache.psd1 +++ b/src/ResourceManager/RedisCache/AzureRM.RedisCache.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Resources/AzureRM.Resources.psd1 b/src/ResourceManager/Resources/AzureRM.Resources.psd1 index 625a7f6dac6c..94658a700a7b 100644 --- a/src/ResourceManager/Resources/AzureRM.Resources.psd1 +++ b/src/ResourceManager/Resources/AzureRM.Resources.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/SiteRecovery/AzureRM.SiteRecovery.psd1 b/src/ResourceManager/SiteRecovery/AzureRM.SiteRecovery.psd1 index 392e7f06546f..76e4a664eca0 100644 --- a/src/ResourceManager/SiteRecovery/AzureRM.SiteRecovery.psd1 +++ b/src/ResourceManager/SiteRecovery/AzureRM.SiteRecovery.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Sql/AzureRM.Sql.psd1 b/src/ResourceManager/Sql/AzureRM.Sql.psd1 index 1bda1f856ddd..098d8ead8bad 100644 --- a/src/ResourceManager/Sql/AzureRM.Sql.psd1 +++ b/src/ResourceManager/Sql/AzureRM.Sql.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Storage/AzureRM.Storage.psd1 b/src/ResourceManager/Storage/AzureRM.Storage.psd1 index 41934b359bb1..6f61fad43a1b 100644 --- a/src/ResourceManager/Storage/AzureRM.Storage.psd1 +++ b/src/ResourceManager/Storage/AzureRM.Storage.psd1 @@ -46,8 +46,8 @@ ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @( - @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}, - @{ ModuleName = 'Azure.Storage'; ModuleVersion = '1.0.5'} + @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'Azure.Storage'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'} ) # Assemblies that must be loaded prior to importing this module diff --git a/src/ResourceManager/StreamAnalytics/AzureRM.StreamAnalytics.psd1 b/src/ResourceManager/StreamAnalytics/AzureRM.StreamAnalytics.psd1 index 135abe863098..696e36e368a3 100644 --- a/src/ResourceManager/StreamAnalytics/AzureRM.StreamAnalytics.psd1 +++ b/src/ResourceManager/StreamAnalytics/AzureRM.StreamAnalytics.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Tags/AzureRM.Tags.psd1 b/src/ResourceManager/Tags/AzureRM.Tags.psd1 index 1f7df96b3d16..8323fc16166f 100644 --- a/src/ResourceManager/Tags/AzureRM.Tags.psd1 +++ b/src/ResourceManager/Tags/AzureRM.Tags.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/TrafficManager/AzureRM.TrafficManager.psd1 b/src/ResourceManager/TrafficManager/AzureRM.TrafficManager.psd1 index 53c26091e107..eb3f06ca5f7e 100644 --- a/src/ResourceManager/TrafficManager/AzureRM.TrafficManager.psd1 +++ b/src/ResourceManager/TrafficManager/AzureRM.TrafficManager.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/UsageAggregates/AzureRM.UsageAggregates.psd1 b/src/ResourceManager/UsageAggregates/AzureRM.UsageAggregates.psd1 index 4a6070c86e06..b7a6b32817f4 100644 --- a/src/ResourceManager/UsageAggregates/AzureRM.UsageAggregates.psd1 +++ b/src/ResourceManager/UsageAggregates/AzureRM.UsageAggregates.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ResourceManager/Websites/AzureRM.Websites.psd1 b/src/ResourceManager/Websites/AzureRM.Websites.psd1 index 3610a87d13e4..55b553ba9a77 100644 --- a/src/ResourceManager/Websites/AzureRM.Websites.psd1 +++ b/src/ResourceManager/Websites/AzureRM.Websites.psd1 @@ -45,7 +45,7 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'}) +RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() diff --git a/src/ServiceManagement/Profile/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml b/src/ServiceManagement/Profile/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml index 8deb8354b131..e8b25266768d 100644 --- a/src/ServiceManagement/Profile/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml +++ b/src/ServiceManagement/Profile/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml @@ -2094,19 +2094,6 @@ - - SubscriptionDataFile - - [Deprecated]: The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. - - string - - string - - - - - @@ -2175,26 +2162,6 @@ PS C:\> - PS C:\>Import-AzurePublishSettingsFile –PublishSettingsFile C:\Temp\MyAccount.publishsettings –SubscriptionDataFile C:\Subs\Subscriptions.xml - - This command imports the "C:\Temp\MyAccountName-date-credentials.publishsettings" file and then saves the subscription data file in C:\Subs\Subscriptions.xml. - - - When you use the SubscriptionDataFile parameter to save your subscription data file in an alternate location, be sure to use the SubscriptionDataFile parameter of cmdlets that use subscription data file, such as Select-AzureSubscription and Remove-AzureAccount. - - - - - - - - - - - -------------------------- Example 3 -------------------------- - - PS C:\> - PS C:\>Import-AzurePublishSettingsFile –PublishSettingsFile C:\Temp\MyAccount.publishsettings -Environment AzureChinaCloud This command imports the "C:\Temp\MyAccount.publishsettings" file and sets the Azure environment of all imported subscriptions to be AzureChinaCloud. This will overwrite the endpoints defined in the publish settings file. @@ -5215,4 +5182,4 @@ - \ No newline at end of file + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs index 69f6a3ef1d2b..1bbf4ccbe4d3 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs @@ -53,7 +53,7 @@ public void GetAzureSqlDatabaseOperationWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-7: Create and Query $testdb diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs index d1db7e05b9fc..b23ddc69987b 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs @@ -50,7 +50,7 @@ public void GetAzureSqlDatabaseServiceObjectiveWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-6: Retrieving all (6) ServiceObjectives and DimensionSettings diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs index 5c69faac277a..0a1589420fc1 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs @@ -62,7 +62,7 @@ public void GetAzureSqlDatabaseWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); // 0 - 5 // Get all databases + ServiceObjective lookup // 6 - 11 @@ -147,7 +147,7 @@ public void GetAzureSqlDatabaseWithSqlAuthByPipe() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 12) { // Request 0-3: Get all databases + ServiceObjectives requests @@ -224,7 +224,7 @@ public void GetAzureSqlDatabaseWithSqlAuthNonExistentDb() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-2: Get database requests diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs index 56e3615c3248..6b3bdfbf7c05 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs @@ -62,7 +62,7 @@ public void GetRestorableDroppedDatabaseWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 3) { DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); @@ -162,7 +162,7 @@ public void GetRestorableDroppedDatabaseWithSqlAuthByPipe() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 5) { DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); @@ -270,7 +270,7 @@ public void GetRestorableDroppedDatabaseWithSqlAuthNonExistentDb() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 1) { DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs index b42bce33a817..fbe60e04bff1 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs @@ -288,7 +288,7 @@ public static void CreateServerContextSqlAuth( (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-2: Create context with both ManageUrl and ServerName overriden diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs index f10c12f76b1e..c0457c09b277 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs @@ -74,7 +74,7 @@ public void NewAzureSqlDatabaseWithSqlAuthDuplicateName() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-1: Create testdb1 @@ -141,7 +141,7 @@ public static void CreateTestDatabasesWithSqlAuth( (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-2: Create testdb1 @@ -234,7 +234,7 @@ public static void RemoveTestDatabasesWithSqlAuth( (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-5: Remove database requests diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs index 964ebe30c9a3..833183c597f0 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs @@ -54,7 +54,7 @@ public void CreatePremiumDatabasesWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); }); TestCreatePremiumDatabase(powershell, testSession); @@ -170,7 +170,7 @@ public static void RemoveTestDatabasesWithSqlAuth( (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-11: Remove database requests diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs index 896a64ec93ed..1e4c9dc85c51 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs @@ -54,7 +54,7 @@ public void RemoveAzureSqlDatabaseWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 8) { // Request 0-5: Remove database requests @@ -71,7 +71,7 @@ public void RemoveAzureSqlDatabaseWithSqlAuth() using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) { - // Create context with both ManageUrl and ServerName overriden + // Create context with both ManageUrl and ServerName overridden Collection databases; using (new MockHttpServer( exceptionManager, diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs index 99c5019bca73..da6d24cc4909 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs @@ -61,7 +61,7 @@ public void SetAzureSqlDatabaseSizeWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 10) { // Request 0-2: Set testdb1 with new MaxSize @@ -142,7 +142,7 @@ public void SetAzureSqlDatabaseNameWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); if (expected.Index < 10) { // Request 0-4: Set testdb1 with new name of new_testdb1 @@ -211,7 +211,7 @@ public void SetAzureSqlDatabaseServiceObjectiveWithSqlAuth() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-1: Get Service Objective diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs index 22f506578704..9f99cc35f054 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs @@ -376,7 +376,7 @@ public void GetAzureSqlDatabaseServerQuotaSqlAuthTest() (expected, actual) => { Assert.AreEqual(expected.RequestInfo.Method, actual.Method); - Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + Assert.IsNotNull(actual.UserAgent); switch (expected.Index) { // Request 0-1: Create testdb1 diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs index f8e48688085f..3886349bf169 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs @@ -56,7 +56,7 @@ protected ServerDataServiceContext(Uri serviceUri) } /// - /// Handler to add aditional headers and properties to the request. + /// Handler to add additional headers and properties to the request. /// /// The request to enhance. protected virtual void OnEnhanceRequest(HttpWebRequest request) diff --git a/tools/AzureRM/AzureRM.psd1 b/tools/AzureRM/AzureRM.psd1 index 36e97ea3debc..e0849a510d70 100644 --- a/tools/AzureRM/AzureRM.psd1 +++ b/tools/AzureRM/AzureRM.psd1 @@ -7,9 +7,6 @@ # @{ - -# Script module or binary module file associated with this manifest. -RootModule = '.\AzureRM.psm1' # Version number of this module. ModuleVersion = '1.2.2' @@ -48,7 +45,37 @@ CLRVersion='4.0' ProcessorArchitecture = 'None' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @() +RequiredModules = @( + @{ ModuleName = 'AzureRM.Profile'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'Azure.Storage'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.ApiManagement'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Automation'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Backup'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Batch'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Compute'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.2.4'}, + @{ ModuleName = 'AzureRM.DataFactories'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.DataLakeAnalytics'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.DataLakeStore'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Dns'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.HDInsight'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.6'}, + @{ ModuleName = 'AzureRM.Insights'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.KeyVault'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.1.4'}, + @{ ModuleName = 'AzureRM.LogicApp'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.1'}, + @{ ModuleName = 'AzureRM.Network'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.NotificationHubs'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.OperationalInsights'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.RecoveryServices'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.6'}, + @{ ModuleName = 'AzureRM.RedisCache'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.1.3'}, + @{ ModuleName = 'AzureRM.Resources'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.SiteRecovery'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.1.4'}, + @{ ModuleName = 'AzureRM.Sql'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Storage'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.StreamAnalytics'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Tags'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.TrafficManager'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.UsageAggregates'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'}, + @{ ModuleName = 'AzureRM.Websites'; MaximumVersion = '1.9999.9999.9999'; ModuleVersion = '1.0.5'} +) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = @() @@ -65,8 +92,7 @@ FormatsToProcess = @( ) # Modules to import as nested modules of the module specified in ModuleToProcess -NestedModules = @( -) +NestedModules = @() # Functions to export from this module FunctionsToExport = '*' @@ -78,7 +104,7 @@ CmdletsToExport = '*' VariablesToExport = '*' # Aliases to export from this module -AliasesToExport = @('Install-AzureRM') +AliasesToExport = @() # List of all modules packaged with this module ModuleList = @() diff --git a/tools/AzureRM/AzureRM.psm1 b/tools/AzureRM/AzureRM.psm1 deleted file mode 100644 index 9cd1dedd8847..000000000000 --- a/tools/AzureRM/AzureRM.psm1 +++ /dev/null @@ -1,261 +0,0 @@ -$AzureRMDependencies = @{ - "Azure.Storage" = "1.0.5"; - "AzureRM.Profile" = "1.0.5"; -} - -$AzureRMModules = @{ - "AzureRM.ApiManagement" = "1.0.5"; - "AzureRM.Automation" = "1.0.5"; - "AzureRM.Backup" = "1.0.5"; - "AzureRM.Batch" = "1.0.5"; - "AzureRM.Compute" = "1.2.4"; - "AzureRM.DataFactories" = "1.0.5"; - "AzureRM.DataLakeAnalytics" = "1.0.5"; - "AzureRM.DataLakeStore" = "1.0.5"; - "AzureRM.Dns" = "1.0.5"; - "AzureRM.HDInsight" = "1.0.6"; - "AzureRM.Insights" = "1.0.5"; - "AzureRM.KeyVault" = "1.1.4"; - "AzureRM.Network" = "1.0.5"; - "AzureRM.NotificationHubs" = "1.0.5"; - "AzureRM.OperationalInsights" = "1.0.5"; - "AzureRM.RecoveryServices" = "1.0.6"; - "AzureRM.RedisCache" = "1.1.3"; - "AzureRM.Resources" = "1.0.5"; - "AzureRM.SiteRecovery" = "1.1.4"; - "AzureRM.Sql" = "1.0.5"; - "AzureRM.Storage" = "1.0.5"; - "AzureRM.StreamAnalytics" = "1.0.5"; - "AzureRM.Tags" = "1.0.5"; - "AzureRM.TrafficManager" = "1.0.5"; - "AzureRM.UsageAggregates" = "1.0.5"; - "AzureRM.Websites" = "1.0.5"; - "AzureRM.LogicApp" = "1.0.1"; -} - -function Test-AdminRights([string]$Scope) -{ - if ($Scope -ne "CurrentUser") - { - $user = [Security.Principal.WindowsIdentity]::GetCurrent(); - $isAdmin = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) - if($isAdmin -eq $false) - { - throw "Administrator rights are required to install or uninstall Microsoft Azure modules" - } - } -} - -function CheckIncompatibleVersion([bool]$Force) -{ - $message = "An incompatible version of Azure Resource Manager PowerShell cmdlets is installed. Please uninstall Microsoft Azure PowerShell using the 'Control Panel' before installing these cmdlets. To install these cmdlets regardless of compatibility issues, execute 'Install-AzureRM -Force'." - $path = ${env:ProgramFiles(x86)} - if ($path -eq $null) - { - $path = ${env:ProgramFiles} - } - - if ( Test-Path "$path\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureResourceManager.psd1") - { - if ($Force) - { - Write-Warning $message - } - else - { - throw $message - } - } -} - -function Install-ModuleWithVersionCheck([string]$Name,[string]$MinimumVersion,[string]$Repository,[string]$Scope,[switch]$Force) -{ - $_MinVer = $MinimumVersion - $_MaxVer = "$($_MinVer.Split(".")[0]).9999.9999.9999" - $script:InstallCounter ++ - try { - $_ExistingModule = Get-Module -ListAvailable -Name $Name - $_ModuleAction = "installed" - if ($_ExistingModule -ne $null) - { - Install-Module -Name $Name -Repository $Repository -Scope $Scope -MinimumVersion $_MinVer -MaximumVersion $_MaxVer -Force:$force -ErrorAction Stop - $_ModuleAction = "updated" - } - else - { - Install-Module -Name $Name -Repository $Repository -Scope $Scope -MinimumVersion $_MinVer -MaximumVersion $_MaxVer -ErrorAction Stop - } - $v = (Get-InstalledModule -Name $Name -ErrorAction Ignore)[0].Version.ToString() - Write-Output "$Name $v $_ModuleAction [$script:InstallCounter/$($AzureRMModules.Count + $AzureRMDependencies.Count)]..." - } catch { - Write-Warning "Skipping $Name package..." - Write-Warning $_ - } -} - -<# - .Synopsis - Install Azure Resource Manager cmdlet modules - - .Description - Installs all the available Azure Resource Manager cmdlet modules that have a matching major version. - - .Parameter MajorVersion - Specifies the major version. - - .Parameter Repository - Limit the search for "AzureRM" cmdlets in a specific repository. - - .Parameter Scope - Specifies the parameter scope. - - .Parameter Force - Force download and installation of modules already installed. -#> -function Update-AzureRM -{ - - param( - [Parameter(Position=0, Mandatory = $false)] - [string] - $MajorVersion, - [Parameter(Position=1, Mandatory = $false)] - [string] - $Repository = "PSGallery", - [Parameter(Position=2, Mandatory = $false)] - [ValidateSet("CurrentUser","AllUsers")] - [string] - $Scope = "AllUsers", - [switch] - $Force = $false) - - Test-AdminRights $Scope - CheckIncompatibleVersion($Force.IsPresent) - - Write-Output "Installing AzureRM modules." - - $_InstallationPolicy = (Get-PSRepository -Name $Repository).InstallationPolicy - $script:InstallCounter = 0 - - try - { - Set-PSRepository -Name $Repository -InstallationPolicy Trusted - - # Update Profile and Storage - Install-ModuleWithVersionCheck "AzureRM.Profile" $AzureRMDependencies["AzureRM.Profile"] $Repository $Scope -Force:$force - Install-ModuleWithVersionCheck "Azure.Storage" $AzureRMDependencies["Azure.Storage"] $Repository $Scope -Force:$force - - # Start new job - $AzureRMModules.Keys | ForEach { - $_MinVer = $MajorVersion - if(!$MajorVersion) { - $_MinVer = $AzureRMModules[$_] - } - Install-ModuleWithVersionCheck $_ $_MinVer $Repository $Scope -Force:$force - } - } finally { - # Clean up - Set-PSRepository -Name $Repository -InstallationPolicy $_InstallationPolicy - } -} - -<# - .Synopsis - Import Azure Resource Manager cmdlet modules - - .Description - Imports all the Azure Resource Manager cmdlet modules that have a matching major version. - - .Parameter MajorVersion - Specifies the major version. -#> -function Import-AzureRM -{ - param( - [Parameter(Position=0, Mandatory = $false)] - [string] - $MajorVersion ) - Write-Output "Importing AzureRM modules." - - $AzureRMModules.Keys | ForEach { - $moduleName = $_ - $_MinVer = $MajorVersion - if(!$MajorVersion) { - $_MinVer = $AzureRMModules[$_] - } - $_MaxVer = "$($_MinVer.Split(".")[0]).9999.9999.9999" - - $_MatchedModule = Get-InstalledModule -Name $moduleName -MinimumVersion $_MinVer -MaximumVersion $_MaxVer -ErrorAction Ignore | where {$_.Name -eq $moduleName} - if ($_MatchedModule -ne $null) { - try { - Import-Module -Name $_MatchedModule.Name -RequiredVersion $_MatchedModule.Version -ErrorAction Stop - Write-Output "$moduleName imported..." - } catch { - Write-Warning "Skipping $Name module..." - Write-Warning $_ - } - } - } -} - -function Uninstall-ModuleWithVersionCheck([string]$Name,[string]$MinVersion) -{ - $_MinVer = $MinVersion - $_MaxVer = "$($_MinVer.Split(".")[0]).9999.9999.9999" - # This is a workaround for a bug in PowerShellGet that uses "start with" matching for module name - $_MatchedModule = Get-InstalledModule -Name $Name -MinimumVersion $_MinVer -MaximumVersion $_MaxVer -ErrorAction Ignore | where {$_.Name -eq $Name} - if ($_MatchedModule -ne $null) { - try { - Remove-Module -Name $Name -Force -ErrorAction Ignore - Uninstall-Module -Name $Name -MinimumVersion $_MinVer -MaximumVersion $_MaxVer -Confirm:$false -ErrorAction Stop - if ((Get-Module -Name $Name -ListAvailable) -eq $null) - { - Write-Output "$Name uninstalled..." - } - else - { - Write-Output "$Name partially uninstalled..." - } - } catch { - Write-Warning "Skipping $Name package..." - Write-Warning $_ - } - } -} - -<# - .Synopsis - Remove Azure Resource Manager cmdlet modules - - .Description - Removes all installed Azure Resource Manager cmdlet modules that have a matching major version. - - .Parameter MajorVersion - Specifies the major version. -#> -function Uninstall-AzureRM -{ - param( - [Parameter(Position=0, Mandatory = $false)] - [string] - $MinVersion) - - Test-AdminRights "AllUsers" - - Write-Output "Uninstalling AzureRM modules." - - $AzureRMModules.Keys | ForEach { - $moduleName = $_ - $_MinVer = $MinVersion - if(!$MinVersion) { - $_MinVer = $AzureRMModules[$_] - } - Uninstall-ModuleWithVersionCheck $_ $_MinVer - } - - Uninstall-ModuleWithVersionCheck "Azure.Storage" $AzureRMDependencies["Azure.Storage"] - Uninstall-ModuleWithVersionCheck "AzureRM.Profile" $AzureRMDependencies["AzureRM.Profile"] -} - -New-Alias -Name Install-AzureRM -Value Update-AzureRM -Export-ModuleMember -function * -Alias * \ No newline at end of file diff --git a/tools/AzureRM/AzureRM.psm1-help.xml b/tools/AzureRM/AzureRM.psm1-help.xml deleted file mode 100644 index 319c17f272ed..000000000000 --- a/tools/AzureRM/AzureRM.psm1-help.xml +++ /dev/null @@ -1,438 +0,0 @@ - - - - - Install-ModuleWithVersionCheck - - - - - - - Install - ModuleWithVersionCheck - - - - - - - - Install-ModuleWithVersionCheck - - Name - - - - String - - - MinimumVersion - - - - String - - - Repository - - - - String - - - Scope - - - - String - - - - - - Name - - - - String - - String - - - - - - MinimumVersion - - - - String - - String - - - - - - Repository - - - - String - - String - - - - - - Scope - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Uninstall-AzureRM - - Remove Azure Resource Manager cmdlet modules - - - - - Uninstall - AzureRM - - - - Removes all installed Azure Resource Manager cmdlet modules. - - - - Uninstall-AzureRM - - Repository - - - - String - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - - - MinVersion - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Update-AzureRM - - Install Azure Resource Manager cmdlet modules - - - - - Update - AzureRM - - - - Installs all the available Azure Resource Manager cmdlet modules. - - - - Update-AzureRM - - Repository - - Limit the search for "AzureRM" cmdlets in a specific repository. - - String - - - Scope - - Specifies the parameter scope. - - String - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - - - MajorVersion - - Minimum major version for the update. - - String - - String - - - - - - Repository - - Limit the search for "AzureRM" cmdlets in a specific repository. - - String - - String - - - - - - Scope - - Specifies the parameter scope. - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test-AdminRights - - Validate this session is running as Administrator - - - - - Test - AdminRights - - - - Validate this session is running as Administrator to ensure Install-Module, Update-Module and Uninstall module will function properly for the given run scope of the AzureRM PowerShellGet commands. - - - - Validate-AdminRights - - Scope - - - - String - - - - - - Scope - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tools/PublishModules.ps1 b/tools/PublishModules.ps1 index 08591e98e748..27af1a3cde8f 100644 --- a/tools/PublishModules.ps1 +++ b/tools/PublishModules.ps1 @@ -76,14 +76,6 @@ if (($scope -eq 'All') -or ($scope -eq 'AzureStorage')) { Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName -Tags ("Azure") } -if (($scope -eq 'All') -or ($scope -eq 'AzureRM')) { - # Publish AzureRM module - $modulePath = "$PSScriptRoot\AzureRM" - Write-Host "Publishing AzureRM module from $modulePath" - Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName -Tags ("Azure") - Write-Host "Published Azure module" -} - $resourceManagerModules = Get-ChildItem -Path $resourceManagerRootFolder -Directory if ($scope -eq 'All') { foreach ($module in $resourceManagerModules) { @@ -106,3 +98,11 @@ if ($scope -eq 'All') { Write-Error "Can not find module with name $scope to publish" } } + +if (($scope -eq 'All') -or ($scope -eq 'AzureRM')) { + # Publish AzureRM module + $modulePath = "$PSScriptRoot\AzureRM" + Write-Host "Publishing AzureRM module from $modulePath" + Publish-Module -Path $modulePath -NuGetApiKey $apiKey -Repository $repoName -Tags ("Azure") + Write-Host "Published Azure module" +}