diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Remote_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Remote_Variables.md index 45660395783e..4e7fb14c18e4 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Remote_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Remote_Variables.md @@ -42,7 +42,7 @@ remote variable must be defined in the same PSSession. ```powershell $s = New-PSSession -ComputerName S1 -Invoke-Command -ComputerName S1 -ScriptBlock {$ps = "Windows PowerShell"} +Invoke-Command -Sessions $s -ScriptBlock {$ps = "Windows PowerShell"} Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $ps} ``` @@ -121,4 +121,4 @@ Invoke-Command -ComputerName S1 -ScriptBlock { [Enter-PSSession](../Enter-PSSession.md) -[New-PSSession](../New-PSSession.md) \ No newline at end of file +[New-PSSession](../New-PSSession.md)