win_setup: don't fail when running as non-admin and EAP is set to Stop (#46149)
This commit is contained in:
parent
05e3b5d632
commit
d0d4f2e406
1 changed files with 2 additions and 1 deletions
|
@ -404,7 +404,8 @@ if($gather_subset.Contains('windows_domain')) {
|
||||||
|
|
||||||
if($gather_subset.Contains('winrm')) {
|
if($gather_subset.Contains('winrm')) {
|
||||||
|
|
||||||
$winrm_https_listener_parent_paths = Get-ChildItem -Path WSMan:\localhost\Listener -Recurse | Where-Object {$_.PSChildName -eq "Transport" -and $_.Value -eq "HTTPS"} | select PSParentPath
|
$winrm_https_listener_parent_paths = Get-ChildItem -Path WSMan:\localhost\Listener -Recurse -ErrorAction SilentlyContinue | `
|
||||||
|
Where-Object {$_.PSChildName -eq "Transport" -and $_.Value -eq "HTTPS"} | select PSParentPath
|
||||||
if ($winrm_https_listener_parent_paths -isnot [array]) {
|
if ($winrm_https_listener_parent_paths -isnot [array]) {
|
||||||
$winrm_https_listener_parent_paths = @($winrm_https_listener_parent_paths)
|
$winrm_https_listener_parent_paths = @($winrm_https_listener_parent_paths)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue