hello,
I have somethings like this :
#Start the process on the remote machine
$Context.LogMessage("Get statistivcs on %cn%", "Information")
$Server = New-PSSession -ComputerName $computername -Credential $credential
Invoke-Command -Session $Server -ScriptBlock {$a = Get-RemoteAccessConnectionStatisticsSummary
}
$Context.LogMessage("$a", "Information")
remove-PSSession $Server
I need to pass the value of $a into the main script so I can see $a in $Context.LogMessage.
is that possible?
Thanks.