From d8f9c81022014eecc0d9a9366100765de0c8520c Mon Sep 17 00:00:00 2001 From: Matt Calhoun Date: Tue, 29 Sep 2015 16:35:47 -0400 Subject: [PATCH] The variable $winrm_https_listener_path cannot be retrieved because it has not been set --- windows/setup.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/windows/setup.ps1 b/windows/setup.ps1 index 3e3317d0450..91100912e44 100644 --- a/windows/setup.ps1 +++ b/windows/setup.ps1 @@ -77,6 +77,7 @@ $psversion = $PSVersionTable.PSVersion.Major 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 if ($winrm_https_listener_parent_path ) { $winrm_https_listener_path = $winrm_https_listener_parent_path.PSParentPath.Substring($winrm_https_listener_parent_path.PSParentPath.LastIndexOf("\"))