remove non-canonical cmdlets in tools/AzureRM.Example.psm1, use formal cmdlet instead
This commit is contained in:
Родитель
4c70ac849a
Коммит
b147b659f6
|
@ -13,7 +13,7 @@ function Test-DotNet
|
|||
{
|
||||
try
|
||||
{
|
||||
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 })))
|
||||
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 })))
|
||||
{
|
||||
throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher."
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ if($PSEdition -eq 'Core' -and (Test-Path $netCorePath -ErrorAction Ignore))
|
|||
{
|
||||
try
|
||||
{
|
||||
$loadedAssemblies = ([System.AppDomain]::CurrentDomain.GetAssemblies() | %{New-Object -TypeName System.Reflection.AssemblyName -ArgumentList $_.FullName} )
|
||||
$loadedAssemblies = ([System.AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object {New-Object -TypeName System.Reflection.AssemblyName -ArgumentList $_.FullName} )
|
||||
Get-ChildItem -ErrorAction Stop -Path $netCorePath -Filter "*.dll" | ForEach-Object {
|
||||
$assemblyName = ([System.Reflection.AssemblyName]::GetAssemblyName($_.FullName))
|
||||
$matches = ($loadedAssemblies | Where-Object {$_.Name -eq $assemblyName.Name})
|
||||
|
|
Загрузка…
Ссылка в новой задаче