Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

What are the minimum Remote Powershell permissions required for a user?

$
0
0

I am writing a web service which needs to execute remote powershell in logged-on user context.

The application works fine if the logged-in user is a member of administrators group on remote machine, else the RunspaceFactory.CreateRunspace API fails with PSInvalidOperationException.

I have tried adding user to remote powershell users (using Set-PSSessionConfiguration), which I believe is the only required permission to run remote powershell.

Also, when I try this in a C# console application it works fine. I see the issue only with my web service.

I have also tried setting aspnet.config to allow flow of impersonation but still no luck.

<configuration><runtime><legacyImpersonationPolicyenabled=”false”/><alwaysFlowImpersonationPolicyenabled=”true”/></runtime></configuration>

I want to know if there are any additional settings required for IIS or ASP .NET to make it work?

Warm Regards

Himanshu Agarwal


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>