Merge pull request #2173 from mcalhoun/devel
Powershell throwing 'The variable cannot be retrieved because it has not been set' error
This commit is contained in:
commit
fbd9c0a375
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,10 @@ $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
|
||||
$https_listener = $null
|
||||
$winrm_cert_thumbprint = $null
|
||||
$uppercase_cert_thumbprint = $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("\"))
|
||||
|
|
Loading…
Reference in a new issue