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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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