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 "" }
|
||||
|
||||
$commonSuffix = $null
|
||||
foreach ($host in $fqdnHosts) {
|
||||
$clean = $host.Trim().TrimEnd(".")
|
||||
foreach ($hostName in $fqdnHosts) {
|
||||
$clean = $hostName.Trim().TrimEnd(".")
|
||||
$labels = $clean -split "\."
|
||||
if ($labels.Count -lt 2) { continue }
|
||||
$zoneLabels = $labels[1..($labels.Count - 1)]
|
||||
|
||||
Reference in New Issue
Block a user