mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
The variable $https_listener cannot be retrieved because it has not been set.
This commit is contained in:
@@ -78,6 +78,8 @@ Set-Attr $result.ansible_facts "ansible_powershell_version" $psversion
|
||||
|
||||
$winrm_https_listener_parent_path = Get-ChildItem -Path WSMan:\localhost\Listener -Recurse | Where-Object {$_.PSChildName -eq "Transport" -and $_.Value -eq "HTTPS"} | select PSParentPath
|
||||
$winrm_https_listener_path = $null
|
||||
$https_listener = $null
|
||||
|
||||
|
||||
if ($winrm_https_listener_parent_path ) {
|
||||
$winrm_https_listener_path = $winrm_https_listener_parent_path.PSParentPath.Substring($winrm_https_listener_parent_path.PSParentPath.LastIndexOf("\"))
|
||||
|
||||
Reference in New Issue
Block a user