First, you'll need PSExec.exe, it's free and provided by the sys internals group. You want a command similar to this:
psexec \\RemoteComputer "%systemroot%\system32\windowspowershell\v1.0\powershell.exe" -u username -p password -i -h
Read the PSExec help file and play around with the settings. You'll be most interested in the '-i' switch as it's what indicates the session to interact with. Just using the '-i' without a session id (like in the example), psexec just chooses one. If there isn't one available, it'll use session 0.
You may even find that the New-PSSession
and Enter-PSSession
Powershell cmdlets are better suited to what you need. On your computer, run the following in powershell:
$Session = New-PSSession -ComputerName computer.domain.com Enter-PSSession -Session $Session
When you run those commands, your terminal on your machine becomes the terminal on the remote machine. Commands you enter in the remote session are executed on the remote machine and the output is fed back to yours. When your done enter the Exit-PSSession
command to return to your own session.