Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Set execution policy via CM 2012 SP1

$
0
0

Good afternoon everyone.

Sorry about the last question.  I'd attempted to resolve this in so many ways that the last question was based on an old attempt.

I'm trying to set the PowerShell Execution Policy through a batch file.  Specifically, the batch file contains one single command: 

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList 'Set-ExecutionPolicy RemoteSigned -Force' -Verb RunAs}"

If I run this command standalone, either as local Admin or not, the batch file completes and the execpol is changed appropriately.

When deploying the batch file through CM, Software Center shows a successful installation but the ExecPol value does not change.  The batch file within CM is configured to run as administrator.

Any suggestions as to what I may be doing wrong would be greatly appreciated.

Thanks very much.


IAmStrings



Viewing all articles
Browse latest Browse all 4762

Trending Articles



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