I have setup powershell remoting on two servers. I can confirm this by being able to access ServerB from ServerA with enter-pssession. When attempting to run scripts from ServerA to ServerB using Invoke-command I come across these two roadblocks:
When attempting to recycle app pool on ServerB from ServerA-
Error: Process should have elevated status to access IIS configuration data.
When attempting to access a file on ServerB from ServerA-
Error: Access to the path denied.
Two things I think may be happening- seems as though the script is not running as admin on ServerB, or I have not given proper rights to ServerB.
Any help on how to resolve this would be appreciated.