Skip to content

Commit 9d1ba4c

Browse files
authored
Merge pull request Azure#10244 from VeryEarly/remove-nonCanonical-cmdlet-in-AzureRM.Example.psm1#9737
remove non-canonical cmdlets in tools/AzureRM.Example.psm1, use forma…
2 parents 7e797b2 + 007e7e4 commit 9d1ba4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/AzureRM.Example.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Test-DotNet
1313
{
1414
try
1515
{
16-
if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where { $_ -ge 461808 })))
16+
if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where-Object { $_ -ge 461808 })))
1717
{
1818
throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher."
1919
}
@@ -66,7 +66,7 @@ if($PSEdition -eq 'Core' -and (Test-Path $netCorePath -ErrorAction Ignore))
6666
{
6767
try
6868
{
69-
$loadedAssemblies = ([System.AppDomain]::CurrentDomain.GetAssemblies() | %{New-Object -TypeName System.Reflection.AssemblyName -ArgumentList $_.FullName} )
69+
$loadedAssemblies = ([System.AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object {New-Object -TypeName System.Reflection.AssemblyName -ArgumentList $_.FullName} )
7070
Get-ChildItem -ErrorAction Stop -Path $netCorePath -Filter "*.dll" | ForEach-Object {
7171
$assemblyName = ([System.Reflection.AssemblyName]::GetAssemblyName($_.FullName))
7272
$matches = ($loadedAssemblies | Where-Object {$_.Name -eq $assemblyName.Name})

0 commit comments

Comments
 (0)