Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Run batch file in specific user session (no PSExec allowed)

$
0
0

I've one user logged in a VM, with 3 sessions opened (sessions 2, 3 and 4). I need to run a batch file in specific session, e.g.: 'C:\test.bat' in session 2.

I'm already doing this with PSExec, but I want to know if there someway to make this works without PSExec.

I've been thinking... If I'm the session 2, there's some way to change to session 3 (with tscon) and then run a command in the session 3?


Viewing all articles
Browse latest Browse all 6937

Trending Articles