diff --git a/certy.ps1 b/certy.ps1 index 095e099..7696fad 100644 --- a/certy.ps1 +++ b/certy.ps1 @@ -72,7 +72,7 @@ function Get-FilePreview { function Get-CommonZoneFromHosts { param([string[]]$Hosts) - $fqdnHosts = $Hosts | Where-Object { $_ -and $_.Contains(".") } + $fqdnHosts = @($Hosts | Where-Object { $_ -and $_.Contains(".") }) if (-not $fqdnHosts -or $fqdnHosts.Count -eq 0) { return "" } $commonSuffix = $null @@ -852,7 +852,7 @@ $replicationEnabledBox.Add_CheckedChanged({ $filePreviewBtn.Add_Click({ $path = $fileBox.Text.Trim() if ([string]::IsNullOrWhiteSpace($path)) { - $previewHosts = Split-List $hostsBox.Text + $previewHosts = @(Split-List $hostsBox.Text) if ($previewHosts.Count -gt 0) { $filePreviewBox.Text = ($previewHosts | Select-Object -First 200) -join [Environment]::NewLine return