Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 had a task today to add a new Code Group to my PC, using mscorcfg.msc. Having recently learned how to use Powershell, I thought, how can I do the same thing using Powershell (everything looks like a nail when you have a new hammer).
Despite doing a number of different web searches, I haven't yet uncovered any means for getting Powershell to look at the Code Access Policy.
Can anyone suggest a way to do so?

share|improve this question
up vote 1 down vote accepted

The command line way to add code groups is via caspol.exe. Powershell can of course be used to invoke this as well as be used to create XML files for import into CASPOL.

share|improve this answer

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.