diff --git a/src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs b/src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs index 57544806b13f..95841f88bb49 100644 --- a/src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs +++ b/src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs @@ -16,7 +16,6 @@ using Microsoft.Azure.Commands.Common.Authentication.Abstractions; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Common.Authentication.ResourceManager; -using Microsoft.Azure.Commands.Profile; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Utilities; using Microsoft.Azure.Commands.ResourceManager.Common; @@ -61,7 +60,7 @@ public void AddsAzureEnvironment() var cmdlet = new AddAzureRMEnvironmentCommand() { CommandRuntime = commandRuntimeMock.Object, - Name = "Katal", + Name = "Katal" }; var dict =new Dictionary { @@ -74,6 +73,7 @@ public void AddsAzureEnvironment() }; cmdlet.SetBoundParameters(dict); + cmdlet.SetParameterSet("Name"); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); cmdlet.InvokeEndProcessing(); @@ -189,6 +189,7 @@ public void AddsEnvironmentMultipleTimes() dict["PublishSettingsFileUrl"] = "http://microsoft.com"; dict["EnableAdfsAuthentication"] = true; cmdlet.SetBoundParameters(dict); + cmdlet.SetParameterSet("Name"); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); @@ -211,6 +212,7 @@ public void AddsEnvironmentMultipleTimes() dict.Clear(); dict["EnableAdfsAuthentication"] = true; cmdlet2.SetBoundParameters(dict); + cmdlet2.SetParameterSet("Name"); cmdlet2.InvokeBeginProcessing(); cmdlet2.ExecuteCmdlet(); @@ -229,6 +231,7 @@ public void AddsEnvironmentMultipleTimes() }; dict.Clear(); cmdlet3.SetBoundParameters(dict); + cmdlet3.SetParameterSet("Name"); cmdlet3.InvokeBeginProcessing(); cmdlet3.ExecuteCmdlet(); @@ -257,6 +260,7 @@ public void AddsEnvironmentWithMinimumInformation() dict["EnableAdfsAuthentication"] = true; dict["PublishSettingsFileUrl"] = "http://microsoft.com"; cmdlet.SetBoundParameters(dict); + cmdlet.SetParameterSet("Name"); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); cmdlet.InvokeEndProcessing(); @@ -337,6 +341,7 @@ public void AddsEnvironmentWithStorageEndpoint() StorageEndpoint = "core.windows.net", }; + cmdlet.SetParameterSet("Name"); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); cmdlet.InvokeEndProcessing(); @@ -412,6 +417,7 @@ public void CanCreateEnvironmentWithAllProperties() dict["AzureSynapseAnalyticsEndpointResourceId"] = "AzureSynapseAnalyticsEndpointResourceId"; dict["AzureSynapseAnalyticsEndpointSuffix"] = "https://AzureSynapseAnalytics"; cmdlet.SetBoundParameters(dict); + cmdlet.SetParameterSet("Name"); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); @@ -487,6 +493,8 @@ public void CreateEnvironmentWithTrailingSlashInActiveDirectory() var dict = new Dictionary(); dict["ActiveDirectoryEndpoint"] = "https://ActiveDirectoryEndpoint/"; cmdlet.SetBoundParameters(dict); + cmdlet.SetParameterSet("Name"); + SetupConfirmation(commandRuntimeMock); cmdlet.InvokeBeginProcessing(); cmdlet.ExecuteCmdlet(); diff --git a/src/Accounts/Accounts/Accounts.generated.format.ps1xml b/src/Accounts/Accounts/Accounts.generated.format.ps1xml index d591b4aa0108..69afc8df3204 100644 --- a/src/Accounts/Accounts/Accounts.generated.format.ps1xml +++ b/src/Accounts/Accounts/Accounts.generated.format.ps1xml @@ -20,6 +20,10 @@ Left + + Left + + @@ -36,6 +40,10 @@ Left ActiveDirectoryAuthority + + Left + Type + diff --git a/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index 0b57e8b49f1b..d5c492474bb0 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -18,7 +18,8 @@ - Additional information about change #1 --> ## Upcoming Release -* Update preloaded assemblies [#12024,#11976] +* Supported discovering environment setting by default and adding environment via `Add-AzEnvironment` +* Update preloaded assemblies [#12024], [#11976] * Updated Azure.Core assembly * Fixed an issue that may cause `Connect-AzAccount` to fail in multi-threaded execution [#11201] diff --git a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs index a7df90cadf04..0e082004e0e9 100644 --- a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs @@ -13,12 +13,9 @@ // ---------------------------------------------------------------------------------- using Microsoft.Azure.Commands.Common.Authentication.Abstractions; -using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.Azure.Commands.Profile.Common; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Utilities; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Globalization; @@ -41,6 +38,7 @@ public class AddAzureRMEnvironmentCommand : AzureContextModificationCmdlet private const string MetadataParameterSet = "ARMEndpoint"; private const string EnvironmentPropertiesParameterSet = "Name"; + private const string DiscoveryParameterSet = "Discovery"; public EnvironmentHelper EnvHelper { @@ -48,7 +46,8 @@ public EnvironmentHelper EnvHelper set { this.envHelper = value != null ? value : new EnvironmentHelper(); } } - [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = MetadataParameterSet, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] public string Name { get; set; } [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] @@ -131,7 +130,9 @@ public EnvironmentHelper EnvHelper [Alias("GraphEndpointResourceId", "GraphResourceId")] public string GraphAudience { get; set; } - [Parameter(Position = 19, Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 19, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The audience for tokens authenticating with the AD Data Lake services Endpoint.")] + [Parameter(ParameterSetName = MetadataParameterSet, Position = 19, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The audience for tokens authenticating with the AD Data Lake services Endpoint.")] [Alias("DataLakeEndpointResourceId", "DataLakeResourceId")] public string DataLakeAudience @@ -146,43 +147,70 @@ public string DataLakeAudience } } - [Parameter(Position = 20, Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 20, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure Batch service that is the recipient of the requested token.")] + [Parameter(ParameterSetName = MetadataParameterSet, Position = 20, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource identifier of the Azure Batch service that is the recipient of the requested token.")] [Alias("BatchResourceId", "BatchAudience")] public string BatchEndpointResourceId { get; set; } - [Parameter(Position = 21, Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 21, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The audience for tokens authenticating with the Azure Log Analytics API.")] + [Parameter(ParameterSetName = MetadataParameterSet, Position = 21, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The audience for tokens authenticating with the Azure Log Analytics API.")] public string AzureOperationalInsightsEndpointResourceId { get; set; } - [Parameter(Position = 22, Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Position = 22, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The endpoint to use when communicating with the Azure Log Analytics API.")] + [Parameter(ParameterSetName = MetadataParameterSet, Position = 22, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The endpoint to use when communicating with the Azure Log Analytics API.")] public string AzureOperationalInsightsEndpoint { get; set; } - [Parameter(Mandatory = false, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, + HelpMessage = "The endpoint to use when communicating with the Azure Log Analytics API.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, HelpMessage = "The endpoint to use when communicating with the Azure Log Analytics API.")] public string AzureAnalysisServicesEndpointSuffix { get; set; } - [Parameter(Mandatory = false, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, + HelpMessage = "The resource identifier of the Azure Analysis Services resource.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, HelpMessage = "The resource identifier of the Azure Analysis Services resource.")] public string AzureAnalysisServicesEndpointResourceId { get; set; } - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Dns suffix of Azure Attestation service.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure Attestation service.")] public string AzureAttestationServiceEndpointSuffix { get; set; } - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] public string AzureAttestationServiceEndpointResourceId { get; set; } - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Dns suffix of Azure Synapse Analytics.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure Synapse Analytics.")] public string AzureSynapseAnalyticsEndpointSuffix { get; set; } - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token.")] public string AzureSynapseAnalyticsEndpointResourceId { get; set; } + [Parameter(ParameterSetName = DiscoveryParameterSet, Mandatory = true, + HelpMessage = "Discovers environments via default or configured endpoint.")] + public SwitchParameter AutoDiscover { get; set; } + + [Parameter(ParameterSetName = DiscoveryParameterSet, Mandatory = false, + HelpMessage = "Specifies URI of the internet resource to fetch environments.")] + public Uri Uri { get; set; } + + protected override void BeginProcessing() { // do not call begin processing there is no context needed for this cmdlet @@ -196,7 +224,7 @@ public override void ExecuteCmdlet() if (AzureEnvironment.PublicEnvironments.Keys.Any((k) => string.Equals(k, Name, StringComparison.CurrentCultureIgnoreCase))) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Cannot add built-in environment {0}.", Name)); + "Cannot add built-in or discovered environment {0}.", Name)); } if (this.ParameterSetName.Equals(MetadataParameterSet, StringComparison.Ordinal)) @@ -212,7 +240,10 @@ public override void ExecuteCmdlet() IAzureEnvironment newEnvironment; if (!defProfile.TryGetEnvironment(this.Name, out newEnvironment)) { - newEnvironment = new AzureEnvironment { Name = this.Name }; + newEnvironment = new AzureEnvironment { + Name = this.Name, + Type = AzureEnvironment.TypeUserDefined + }; } if (publicEnvironment.Key == null) @@ -267,7 +298,7 @@ public override void ExecuteCmdlet() WriteObject(new PSAzureEnvironment(client.AddOrSetEnvironment(newEnvironment))); }); } - else + else if (this.ParameterSetName.Equals(EnvironmentPropertiesParameterSet, StringComparison.Ordinal)) { ModifyContext((profile, profileClient) => { @@ -344,6 +375,22 @@ public override void ExecuteCmdlet() } }); } + else + { + AzureEnvironment.DiscoverEnvironments(Uri?.ToString(), this.WriteDebug, this.WriteWarning); + ModifyContext((profile, profileClient) => + { + foreach (var env in profile.EnvironmentTable.Where(i => (i.Value is AzureEnvironment environment) && AzureEnvironment.TypeDiscovered.Equals(environment.Type)).ToList()) + { + profile.EnvironmentTable.Remove(env.Key); + } + foreach (var env in AzureEnvironment.PublicEnvironments.Values) + { + profile.EnvironmentTable[env.Name] = env; + WriteObject(new PSAzureEnvironment(env)); + } + }); + } }); } diff --git a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs index ff89ec0f19b6..5571d47a93aa 100644 --- a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs @@ -12,14 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.Commands.Common.Authentication; using Microsoft.Azure.Commands.Common.Authentication.Abstractions; -using Microsoft.Azure.Commands.Common.Authentication.Models; -using Microsoft.Azure.Commands.Common.Authentication.ResourceManager; using Microsoft.Azure.Commands.Profile.Common; using Microsoft.Azure.Commands.Profile.Models; using Microsoft.Azure.Commands.Profile.Utilities; -using Microsoft.Azure.Commands.ResourceManager.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common; using System; using System.Globalization; @@ -198,7 +194,7 @@ public override void ExecuteCmdlet() if (AzureEnvironment.PublicEnvironments.Keys.Any((k) => string.Equals(k, Name, StringComparison.CurrentCultureIgnoreCase))) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Cannot change built-in environment {0}.", Name)); + "Cannot change built-in or discovered environment {0}.", Name)); } if (this.ParameterSetName.Equals(MetadataParameterSet, StringComparison.Ordinal)) @@ -214,7 +210,11 @@ public override void ExecuteCmdlet() IAzureEnvironment newEnvironment; if (!defProfile.TryGetEnvironment(this.Name, out newEnvironment)) { - newEnvironment = new AzureEnvironment { Name = this.Name }; + newEnvironment = new AzureEnvironment + { + Name = this.Name, + Type = AzureEnvironment.TypeUserDefined + }; } if (publicEnvironment.Key == null) diff --git a/src/Accounts/Accounts/help/Add-AzEnvironment.md b/src/Accounts/Accounts/help/Add-AzEnvironment.md index c7910699dfa9..7ebf002dcc02 100644 --- a/src/Accounts/Accounts/help/Add-AzEnvironment.md +++ b/src/Accounts/Accounts/help/Add-AzEnvironment.md @@ -44,6 +44,12 @@ Add-AzEnvironment [-Name] [[-StorageEndpoint] ] [-ARMEndpoint] [] ``` +### Discovery +``` +Add-AzEnvironment [-AutoDiscover] [-Uri ] [-Scope ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION The Add-AzEnvironment cmdlet adds endpoints and metadata to enable Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager. The built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager. @@ -164,12 +170,27 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -AutoDiscover +Discovers environments via default or configured endpoint. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: Discovery +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AzureAnalysisServicesEndpointResourceId The resource identifier of the Azure Analysis Services resource. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -184,7 +205,7 @@ The endpoint to use when communicating with the Azure Log Analytics API. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -199,13 +220,13 @@ The The resource identifier of the Azure Attestation service that is the recipie ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -214,13 +235,13 @@ Dns suffix of Azure Attestation service. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -259,7 +280,7 @@ Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -274,7 +295,7 @@ Resource identifier of Azure Key Vault data service that is the recipient of the ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -289,7 +310,7 @@ The endpoint to use when communicating with the Azure Log Analytics API. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -304,7 +325,7 @@ The audience for tokens authenticating with the Azure Log Analytics API. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False @@ -319,13 +340,13 @@ The The resource identifier of the Azure Synapse Analytics that is the recipient ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -334,13 +355,13 @@ Dns suffix of Azure Synapse Analytics. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: False Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` @@ -349,7 +370,7 @@ The resource identifier of the Azure Batch service that is the recipient of the ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: BatchResourceId, BatchAudience Required: False @@ -364,7 +385,7 @@ The audience for tokens authenticating with the AD Data Lake services Endpoint. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: DataLakeEndpointResourceId, DataLakeResourceId Required: False @@ -469,7 +490,7 @@ Specifies the name of the environment to add. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: Required: True @@ -560,7 +581,7 @@ Specifies the endpoint for storage (blob, table, queue, and file) access. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: Name, ARMEndpoint Aliases: StorageEndpointSuffix Required: False @@ -585,6 +606,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Uri +Specifies URI of the internet resource to fetch environments. + +```yaml +Type: System.Uri +Parameter Sets: Discovery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -616,7 +652,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs index 0b37d328c49c..01addc80531f 100644 --- a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs +++ b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs @@ -73,6 +73,10 @@ public PSAzureEnvironment() public PSAzureEnvironment(IAzureEnvironment environment) { this.CopyFrom(environment); + if(environment is AzureEnvironment source) + { + this.Type = source.Type; + } } /// @@ -127,6 +131,11 @@ public PSAzureEnvironment(PSObject other) [Ps1Xml(Label = "Name", Target = ViewControl.Table, Position = 0)] public string Name { get; set; } + /// + /// Type of environment + /// + public string Type { get; set; } + /// /// Gets or sets a value indicating whether ADFS authentication should be allowed . /// Generally, this is only used in Azure Stack environments. diff --git a/src/Accounts/Authentication/Properties/Resources.resx b/src/Accounts/Authentication/Properties/Resources.resx index e0a7dd8ac490..fad7dc79ae71 100644 --- a/src/Accounts/Authentication/Properties/Resources.resx +++ b/src/Accounts/Authentication/Properties/Resources.resx @@ -127,7 +127,7 @@ No certificate was found in the certificate store with thumbprint {0} - Changing public environment is not supported. + Changing built-in or discovered environment is not supported. -Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account. @@ -190,7 +190,7 @@ &whr={0} - Removing public environment is not supported. + Removing built-in or discovered environment is not supported. Unable to retrieve service key for ServicePrincipal account {0}. Please log in again to supply the credentials for this service principal. In PowerShell, execute Connect-AzAccount. @@ -340,4 +340,4 @@ Windows Azure Powershell - + \ No newline at end of file diff --git a/tools/Common.Netcore.Dependencies.targets b/tools/Common.Netcore.Dependencies.targets index a4b0d98e3758..a1a919eeabba 100644 --- a/tools/Common.Netcore.Dependencies.targets +++ b/tools/Common.Netcore.Dependencies.targets @@ -3,21 +3,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -32,7 +32,7 @@ - $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.3.14-preview\tools\ + $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.3.15-preview\tools\