none
Can't do PSRemoting

    Question

  • I have 2 machines running Win 7 with PS 3.0. Both are listening on standard ports (checked with Netstat -a), both have enabled PSRemoting and both are running ISE in Admin-mode. From PC A I can do New-PSSession without error. From PC B I get "Access is denied" when doing any PSRemoting commands. I can run WMI-commands from PC B to PC A, and I can do Telnet on port 5985 from PC B to PC A.

    I am writing a PS-script that shall run on PC B. It shall close an Excel-sheet (or Excel completely) on PC A, copy a new version of the sheet from an attachment in Outlook on PC B to PC A and open the sheet again on PC A. Everything is working as long as the sheet is closed on PC A, and I can brut force kill the Excel-process by WMI, but I can't open it again. If I do that by WMI it opens as user ID 0, which operates in the background and can't be visible on the screen on PC A. User is the same on PC A and PC B with same admin-rights as far as I can see.

    Any Ideas?

    Tuesday, February 05, 2013 7:36 AM

Answers

  • Thanks, Nigel, that explaines some of the problems. I will follow your suggestion and make a script on PC A that will restart Excel with the updated sheet. Should not be a problem, since the script is scheduled to run at defined times on PC B.
    • Marked as answer by Bjørn.Steine Monday, February 11, 2013 7:19 AM
    Friday, February 08, 2013 8:06 AM

All replies

  • Can you share the code/commands that are failing?

    It sounds like you are able to establish the remote session, but running some commands results in an error.

    Thursday, February 07, 2013 11:24 PM
  • You can't interact with an active user session remotely as it will be started as a session 0 isolated application for security reasons (at least not since XP). Although you can terminate an active PID, which would result in you seeing the application close on the remote computer, you can't open a new application in a user interactive mode.

    Perhaps you can solve the problem by creating a script on the remote computer that watches for the file change event and opens the Excel spread sheet when that event occurs.


    • Edited by Nigel Finn Thursday, February 07, 2013 11:43 PM Typo
    • Proposed as answer by Nigel Finn Friday, February 08, 2013 8:53 PM
    Thursday, February 07, 2013 11:42 PM
  • After  some more investigation, I have come to the conclusion that I might have some basic diffs in the OS between the 2 machines, so I am reinstalling Win7 on PC A.

    Will probably need some days before everything is up and in sync again.

    Friday, February 08, 2013 8:02 AM
  • Thanks, Nigel, that explaines some of the problems. I will follow your suggestion and make a script on PC A that will restart Excel with the updated sheet. Should not be a problem, since the script is scheduled to run at defined times on PC B.
    • Marked as answer by Bjørn.Steine Monday, February 11, 2013 7:19 AM
    Friday, February 08, 2013 8:06 AM