Small fix for running using Invoke-Expression

A small fix suggested by a user for running ConfigureRemotingForAnsible.

This fixes #20512
This commit is contained in:
Dag Wieers 2017-01-20 22:52:09 +01:00 committed by Matt Clay
parent 899e336b1e
commit e64ef8b0ab

View file

@ -114,7 +114,7 @@ Trap
} }
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$EventSource = $MyInvocation.MyCommand.Name $EventSource = $MyInvocation.MyCommand.Name
If ($EventSource -eq $Null) If (-Not $EventSource)
{ {
$EventSource = "Powershell CLI" $EventSource = "Powershell CLI"
} }