Avoid System.Management.Automation.Internal.Host.InternalHost variable collision
This commit is contained in:
@@ -75,8 +75,8 @@ function Get-CommonZoneFromHosts {
|
|||||||
if (-not $fqdnHosts -or $fqdnHosts.Count -eq 0) { return "" }
|
if (-not $fqdnHosts -or $fqdnHosts.Count -eq 0) { return "" }
|
||||||
|
|
||||||
$commonSuffix = $null
|
$commonSuffix = $null
|
||||||
foreach ($host in $fqdnHosts) {
|
foreach ($hostName in $fqdnHosts) {
|
||||||
$clean = $host.Trim().TrimEnd(".")
|
$clean = $hostName.Trim().TrimEnd(".")
|
||||||
$labels = $clean -split "\."
|
$labels = $clean -split "\."
|
||||||
if ($labels.Count -lt 2) { continue }
|
if ($labels.Count -lt 2) { continue }
|
||||||
$zoneLabels = $labels[1..($labels.Count - 1)]
|
$zoneLabels = $labels[1..($labels.Count - 1)]
|
||||||
|
|||||||
Reference in New Issue
Block a user