Skip to content

Commit 80e1ea3

Browse files
authored
Merge pull request #12235 from number213/merge-from-master
Sync Network with master branch
2 parents a1473c1 + 976635f commit 80e1ea3

File tree

375 files changed

+130057
-79736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+130057
-79736
lines changed

.azure-pipelines/powershell-core.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ variables:
55
LinuxImage: ubuntu-18.04
66
MacOSName: macOS
77
MacOSImage: macOS-10.14
8-
TestFramework: netcoreapp2.2
8+
TestFramework: netcoreapp2.1
99
TestTarget: Test
1010
Configuration: Debug
1111
DebugLocalBuildTasks: true
@@ -22,8 +22,8 @@ jobs:
2222
linux:
2323
OSName: ${{ variables.LinuxName }}
2424
ImageName: ${{ variables.LinuxImage }}
25-
macOS:
26-
OSName: ${{ variables.MacOSName }}
25+
macOS:
26+
OSName: ${{ variables.MacOSName }}
2727
ImageName: ${{ variables.MacOSImage }}
2828
pool:
2929
vmImage: $(ImageName)
@@ -47,8 +47,8 @@ jobs:
4747
linux:
4848
OSName: ${{ variables.LinuxName }}
4949
ImageName: ${{ variables.LinuxImage }}
50-
macOS:
51-
OSName: ${{ variables.MacOSName }}
50+
macOS:
51+
OSName: ${{ variables.MacOSName }}
5252
ImageName: ${{ variables.MacOSImage }}
5353
pool:
5454
vmImage: $(ImageName)
@@ -72,8 +72,8 @@ jobs:
7272
linux:
7373
OSName: ${{ variables.LinuxName }}
7474
ImageName: ${{ variables.LinuxImage }}
75-
macOS:
76-
OSName: ${{ variables.MacOSName }}
75+
macOS:
76+
OSName: ${{ variables.MacOSName }}
7777
ImageName: ${{ variables.MacOSImage }}
7878
pool:
7979
vmImage: $(ImageName)

.azure-pipelines/util/test-steps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ steps:
2828
- pwsh: |
2929
Install-Module -Name Pester -RequiredVersion 4.10.1 -Force
3030
Install-Module -Name Az.Accounts -Scope CurrentUser -Force
31-
$env:PSModulePath = $env:PSModulePath + ";" + (pwd).Path
31+
if ($IsWindows) { $sp = ";" } else { $sp = ":" }
32+
$env:PSModulePath = $env:PSModulePath + $sp + (pwd).Path
3233
Get-ChildItem -Directory Az.* | ForEach-Object {if (Test-Path $_/test-module.ps1) {cd $_; ./test-module.ps1}}
3334
workingDirectory: 'artifacts/Debug'
3435
displayName: 'Test for AutoGen Modules With PowerShell Core'

.azure-pipelines/windows-powershell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
22
WindowsName: windows
33
WindowsImage: VS2017-Win2016
4-
TestFramework: netcoreapp2.2
4+
TestFramework: netcoreapp2.1
55
TestTarget: Test
66
Configuration: Debug
77
DebugLocalBuildTasks: true

ChangeLog.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,136 @@
1+
## 4.3.0 - June 2020
2+
#### Az.Accounts
3+
* Supported discovering environment setting by default and adding environment via 'Add-AzEnvironment'
4+
* Update preloaded assemblies [#12024], [#11976]
5+
* Updated Azure.Core assembly
6+
* Fixed an issue that may cause 'Connect-AzAccount' to fail in multi-threaded execution [#11201]
7+
8+
#### Az.Aks
9+
* Replaced usage of old [AccessProfile API](https://docs.microsoft.com/rest/api/aks/managedclusters/getaccessprofile) with calls to [ListClusterAdmin](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) and [ListClusterUser](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) APIs
10+
11+
#### Az.Batch
12+
* Updated Az.Batch to use 'Microsoft.Azure.Management.Batch' SDK version to 11.0.0
13+
* Added the ability to set the BatchAccount Identity in the 'New-AzBatchAccount' cmdlet
14+
15+
#### Az.CognitiveServices
16+
* Supported displaying account capabilities.
17+
* Supported modifying PublicNetworkAccess.
18+
19+
#### Az.Compute
20+
* Added SimulateEviction parameter to Set-AzVM and Set-AzVmssVM cmdlets.
21+
* Added 'Premium_LRS' to the argument completer of StorageAccountType parameter for New-AzGalleryImageVersion cmdlet.
22+
* Added Substatuses to VMCustomScriptExtension [#11297]
23+
* Added 'Delete' to the argument completer of EvictionPolicy parameter for New-AzVM and New-AzVMConfig cmdlets.
24+
* Fixed name of new VM Extension for SAP
25+
26+
#### Az.DataFactory
27+
* Updated ADF .Net SDK version to 4.9.0
28+
29+
#### Az.EventHub
30+
* Added Managed Identity parameters to 'New-AzEventHubNamespace' and 'Set-AzEventHubNamespace' cmdlets
31+
32+
#### Az.Functions
33+
* Added support to create PowerShell 7.0 and Java 11 function apps
34+
35+
#### Az.HDInsight
36+
* Supported listing hosts and restart specific hosts of the HDInsight cluster.
37+
38+
#### Az.HealthcareApis
39+
* Updated the SDK version to 1.1.0
40+
* Added support for Export settings and Managed Identity
41+
42+
#### Az.Monitor
43+
* Fixed input object parameter for 'Set-AzActivityLogAlert'
44+
* Fixed 'InputObject' parameter for 'Set-AzActionGroup' [#10868]
45+
46+
#### Az.Network
47+
* Added support for AddressPrefixType parameter to 'Remove-AzExpressRouteCircuitConnectionConfig'
48+
* Added new cmdlets for Azure FirewallPolicy
49+
- 'New-AzFirewallPolicyDnsSetting'
50+
- Support for Destination FQDN in Network Rules for Firewall Policy
51+
* Added support for backend address pool operations
52+
- 'New-AzLoadBalancerBackendAddressConfig'
53+
- 'New-AzLoadBalancerBackendAddressPool'
54+
- 'Set-AzLoadBalancerBackendAddressPool'
55+
- 'Remove-AzLoadBalancerBackendAddressPool'
56+
- 'Get-AzLoadBalancerBackendAddressPool'
57+
* Added name validation for 'New-AzIpGroup'
58+
* Added new cmdlets for Azure FirewallPolicy
59+
- 'New-AzFirewallPolicyThreatIntelWhitelist'
60+
* Updated below commands for feature: Custom dns servers set/remove on VirtualWan P2SVpnGateway.
61+
- Updated New-AzP2sVpnGateway: Added optional parameter '-CustomDnsServer' for customers to specify their dns servers to set on P2SVpnGateway, which can be used by Point to site clients.
62+
- Updated Update-AzP2sVpnGateway: Added optional parameter '-CustomDnsServer' for customers to specify their dns servers to set on P2SVpnGateway, which can be used by Point to site clients.
63+
* Updated 'Update-AzVpnGateway'
64+
- Added optional parameter '-BgpPeeringAddress' for customers to specify their custom bgps to set on VpnGateway.
65+
* Added new cmdlet to support resetting the routing state of a VirtualHub resource:
66+
- 'Reset-AzHubRouter'
67+
* Updated below things based on recent swagger change for Firewall Policy
68+
- Changes names for RuleGroup, RuleCollectionGroup and RuleType
69+
- Added support for Firewall Policy NAT Rule Collections to support multiple NAT Rule Collection
70+
* [Breaking Change] Added mandatory parameter 'SourceIpGroup' for 'New-AzFirewallPolicyApplicationRule' and 'New-AzFirewallPolicyNetworkRule'.
71+
* [Breaking Change] Fixed 'New-AzFirewallPolicyApplicationRule', parameter 'SourceAddress' to be mandatory.
72+
* [Breaking Change] Fixed 'New-AzFirewallPolicyApplicationRule', parameter 'SourceAddress' to be mandatory.
73+
* [Breaking Change] Removed mandatory parameters: 'TranslatedAddress', 'TranslatedPort' for 'New-AzFirewallPolicyNatRuleCollection'.
74+
* Added new cmdlets to support PrivateLink On Application Gateway
75+
- 'New-AzApplicationGatewayPrivateLinkConfiguration'
76+
- 'Get-AzApplicationGatewayPrivateLinkConfiguration'
77+
- 'New-AzApplicationGatewayPrivateLinkConfiguration'
78+
- 'Set-AzApplicationGatewayPrivateLinkConfiguration'
79+
- 'Remove-AzApplicationGatewayPrivateLinkConfiguration'
80+
- 'New-AzApplicationGatewayPrivateLinkIpConfiguration'
81+
* Added new cmdlets for HubRouteTables child resource of VirtualHub.
82+
- 'New-AzVHubRoute'
83+
- 'New-AzVHubRouteTable'
84+
- 'Get-AzVHubRouteTable'
85+
- 'Update-AzVHubRouteTable'
86+
- 'Remove-AzVHubRouteTable'
87+
* Updated existing cmdlets to support optional RoutingConfiguration input parameter for custom routing in VirtualWan.
88+
- 'New-AzExpressRouteConnection'
89+
- 'Set-AzExpressRouteConnection'
90+
- 'New-AzVirtualHubVnetConnection'
91+
- 'Update-AzVirtualHubVnetConnection'
92+
- 'New-AzVpnConnection'
93+
- 'Update-AzVpnConnection'
94+
- 'New-AzP2sVpnGateway'
95+
- 'Update-AzP2sVpnGateway'
96+
97+
#### Az.OperationalInsights
98+
* Fixed bug PSWorkspace doesn't implement IOperationalInsightsWorkspace [#12135]
99+
* Added 'pergb2018' to valid value set of parameter 'Sku' in 'Set-AzOperationalInsightsWorkspace'
100+
* Added alias 'FunctionParameters' for parameter 'FunctionParameter' to
101+
- 'New-AzOperationalInsightsSavedSearch'
102+
- 'Set-AzOperationalInsightsSavedSearch'
103+
104+
#### Az.RecoveryServices
105+
* Azure Backup added support for fetching MAB items.
106+
* Azure Site Recovery supports disk type 'StandardSSD_LRS'
107+
108+
#### Az.Resources
109+
* Added 'UsageLocation', 'GivenName', 'Surname', 'AccountEnabled', 'MailNickname', 'Mail' on 'PSADUser' [#10526] [#10497]
110+
* Fixed issue that '-Mail' doesn't work on 'Get-AzADUser' [#11981]
111+
* Added '-ExcludeChangeType' parameter to 'Get-AzDeploymentWhatIfResult' and 'Get-AzResourceGroupDeploymentWhatIfResult'
112+
* Added '-WhatIfExcludeChangeType' parameter to 'New-AzDeployment' and 'New-AzResourceGroupDeployment'
113+
* Updated 'Test-Az*Deployment' cmdlets to show better error messages
114+
* Fixed help message for '-Name' parameter of deployment create and What-If cmdlets
115+
116+
#### Az.Sql
117+
* Added support for service principal for Set SQL Server Azure Active Directory Admin cmdlet
118+
* Fixed sync issue in Data Classification cmdlets.
119+
* Supported searching user by mail on 'Set-AzSqlServerActiveDirectoryAdministrator' [#12192]
120+
121+
#### Az.Storage
122+
* Supported create Storage account with RequireInfrastructureEncryption
123+
- 'New-AzStorageAccount'
124+
* Moved the logic of loading Azure.Core to Az.Accounts
125+
126+
#### Az.Websites
127+
* Added safeguard to delete created webapp if restore failed in 'Restore-AzDeletedWebApp'
128+
* Added 'SourceWebApp.Location' for 'New-AzWebApp' and 'New-AzWebAppSlot'
129+
* Fixed bug that prevented changing Container settings in 'Set-AzWebApp' and 'Set-AzWebAppSlot'
130+
* Fixed bug to get SiteConfig when -Name is not given for Get-AzWebApp
131+
* Added a support to create ASP for Linux Apps
132+
* Added exceptions for clone across resource groups
133+
1134
## 4.2.0 - June 2020
2135
#### Az.Accounts
3136
* Fixed an issue that may cause Az to skip logs in Azure Automation or PowerShell jobs [#11492]

src/Accounts/Accounts/Az.Accounts.psd1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 5/28/2020
6+
# Generated on: 6/17/2020
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.8.1'
15+
ModuleVersion = '1.9.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -142,7 +142,10 @@ PrivateData = @{
142142
# IconUri = ''
143143

144144
# ReleaseNotes of this module
145-
ReleaseNotes = '* Fixed an issue that may cause Az to skip logs in Azure Automation or PowerShell jobs [#11492]'
145+
ReleaseNotes = '* Supported discovering environment setting by default and adding environment via ''Add-AzEnvironment''
146+
* Update preloaded assemblies [#12024], [#11976]
147+
* Updated Azure.Core assembly
148+
* Fixed an issue that may cause ''Connect-AzAccount'' to fail in multi-threaded execution [#11201]'
146149

147150
# Prerelease string of this module
148151
# Prerelease = ''

src/Accounts/Accounts/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
22+
## Version 1.9.0
2123
* Supported discovering environment setting by default and adding environment via `Add-AzEnvironment`
2224
* Update preloaded assemblies [#12024], [#11976]
2325
* Updated Azure.Core assembly

src/Accounts/Accounts/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
// You can specify all the values or you can default the Build and Revision Numbers
4444
// by using the '*' as shown below:
4545

46-
[assembly: AssemblyVersion("1.8.1")]
47-
[assembly: AssemblyFileVersion("1.8.1")]
46+
[assembly: AssemblyVersion("1.9.0")]
47+
[assembly: AssemblyFileVersion("1.9.0")]
4848
#if !SIGN
4949
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Accounts.Test")]
5050
#endif
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
if ($PSEdition -eq 'Desktop') {
22
try {
33
[Microsoft.Azure.Commands.Profile.Utilities.CustomAssemblyResolver]::Initialize()
4-
} catch {}
4+
} catch {
5+
Write-Warning $_
6+
}
57
}

src/Accounts/Accounts/Utilities/CustomAssemblyResolver.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/Accounts/Authentication/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
// You can specify all the values or you can default the Build and Revision Numbers
4444
// by using the '*' as shown below:
4545
// [assembly: AssemblyVersion("1.0.*")]
46-
[assembly: AssemblyVersion("1.8.1")]
47-
[assembly: AssemblyFileVersion("1.8.1")]
46+
[assembly: AssemblyVersion("1.9.0")]
47+
[assembly: AssemblyFileVersion("1.9.0")]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Reflection;
5+
6+
namespace Microsoft.Azure.Commands.Profile.Utilities
7+
{
8+
public static class CustomAssemblyResolver
9+
{
10+
private static IDictionary<string, Version> NetFxPreloadAssemblies =
11+
new Dictionary<string, Version>(StringComparer.InvariantCultureIgnoreCase)
12+
{
13+
{"Azure.Core", new Version("1.2.2.0")},
14+
{"Microsoft.Bcl.AsyncInterfaces", new Version("1.0.0.0")},
15+
{"Microsoft.IdentityModel.Clients.ActiveDirectory", new Version("3.19.2.6005")},
16+
{"Microsoft.IdentityModel.Clients.ActiveDirectory.Platform", new Version("3.19.2.6005")},
17+
{"Newtonsoft.Json", new Version("10.0.0.0")},
18+
{"System.Buffers", new Version("4.0.2.0")},
19+
{"System.Diagnostics.DiagnosticSource", new Version("4.0.4.0")},
20+
{"System.Memory", new Version("4.0.1.1")},
21+
{"System.Net.Http.WinHttpHandler", new Version("4.0.2.0")},
22+
{"System.Numerics.Vectors", new Version("4.1.3.0")},
23+
{"System.Private.ServiceModel", new Version("4.1.2.1")},
24+
{"System.Reflection.DispatchProxy", new Version("4.0.3.0")},
25+
{"System.Runtime.CompilerServices.Unsafe", new Version("4.0.5.0")},
26+
{"System.Security.AccessControl", new Version("4.1.1.0")},
27+
{"System.Security.Permissions", new Version("4.0.1.0")},
28+
{"System.Security.Principal.Windows", new Version("4.1.1.0")},
29+
{"System.ServiceModel.Primitives", new Version("4.2.0.0")},
30+
{"System.Text.Encodings.Web", new Version("4.0.4.0")},
31+
{"System.Text.Json", new Version("4.0.0.0")},
32+
{"System.Threading.Tasks.Extensions", new Version("4.2.0.0")},
33+
{"System.Xml.ReaderWriter", new Version("4.1.0.0")}
34+
};
35+
36+
private static string PreloadAssemblyFolder { get; set; }
37+
38+
public static void Initialize()
39+
{
40+
//This function is call before loading assemblies in PreloadAssemblies folder, so NewtonSoft.Json could not be used here
41+
var accountFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
42+
PreloadAssemblyFolder = Path.Combine(accountFolder, "PreloadAssemblies");
43+
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
44+
}
45+
46+
/// <summary>
47+
/// When the resolution of an assembly fails, if will try to redirect to the higher version
48+
/// </summary>
49+
public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
50+
{
51+
try
52+
{
53+
AssemblyName name = new AssemblyName(args.Name);
54+
if (NetFxPreloadAssemblies.TryGetValue(name.Name, out Version version))
55+
{
56+
if (version >= name.Version && version.Major == name.Version.Major)
57+
{
58+
string requiredAssembly = Path.Combine(PreloadAssemblyFolder, $"{name.Name}.dll");
59+
return Assembly.LoadFrom(requiredAssembly);
60+
}
61+
}
62+
}
63+
catch
64+
{
65+
}
66+
return null;
67+
}
68+
}
69+
}

0 commit comments

Comments
 (0)