I faced a strange problem. If I run the following statement everything is working fine.
Get-Process | Format-Table ProcessName, SessionId
Now I am just adding -computername parameter as follows.
Get-Process -computername localhost | Format-Table ProcessName, SessionId
I am getting a list of processes but all sessionids are 0 which is incorrect. The same is happening if I am trying to get a list of processes from a remote computer.
Did anyone see such a problem?
My OS is Windows 7.