diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md index cdd13115f8e0..d57376b6506e 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Remote_Variables.md @@ -43,7 +43,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 {Get-WinEvent -LogName $ps} +Invoke-Command -Session $s -ScriptBlock {Get-WinEvent -LogName $ps} ``` ## USING LOCAL VARIABLES @@ -76,7 +76,7 @@ You can also use the Using scope modifier in PSSessions. ```powershell $s = New-PSSession -ComputerName S1 $ps = "Windows PowerShell" -Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $Using:ps} +Invoke-Command -Session $s -ScriptBlock {Get-WinEvent -LogName $Using:ps} ``` ## USING LOCAL VARIABLES IN WINDOWS POWERSHELL 2.0