Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some computers I'm trying to remotely execute powershell commands but I'm running into some snags. For one thing, the computers do not have Enable-PSRemoting enabled so I am unable to simply Enter-PSSession. I tried to run a powershell script through psexec but I have yet to Set-Execution Policy on the machine.

My thoughts were to execute a powershell logon script that accomplished this but before I tried this I was going to see if there were any other methods to enable-psremoting on a machine. Thanks in advance!

share|improve this question
up vote 2 down vote accepted

You do not need script for that. :) Here is a little wrapper function I use for exactly that purpose:

function Enable-Remoting {
param (
    psexec \\$ComputerName -s -h -d powershell Enable-PSRemoting -Force
share|improve this answer
Is there a way to avoid using psexec? In order to accomplish most of my remoting needs I use PDQ Deploy because the antivirus solution that is deployed blocks psexec. – user1399195 Aug 29 '12 at 21:57
nevermind, got it to work with PDQ Deploy. Didn't realize it'd be that easy. Thanks! – user1399195 Aug 29 '12 at 22:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.