How do I set the Execute Permissions for an IIS6 website with Powershell using WMI?

Posted by DarkwingDuck on Stack Overflow See other posts from Stack Overflow or by DarkwingDuck
Published on 2010-04-03T00:49:02Z Indexed on 2010/04/03 0:53 UTC
Read the original article Hit count: 323

Filed under:
|
|

In inetmgr you can set the property I desire by going to Home Directory -> Application Settings -> Execute Permissions -> and setting the drop down to 'Scripts Only'. I'm trying to replicate this behavior in Powershell. The Target OS is Windows Server 2003 running IIS6.

Currently I have this simple code to get the site:

$Site = get-wmiobject -Namespace root\MicrosoftIISv2 -query ('select * from IISWebServerSetting where ServerComment="mySite"')

There are lots of properties it might be but nothing really leaps out. I've tried changing the setting in inetmgr and dumping the properties out before and after, but I see no differences (it could be a child property though).

Any ideas? Thanks in advance.

© Stack Overflow or respective owner

Related posts about powershell

Related posts about iis6