# Createing an IIS WebAppPool, properties do not set

**URL:** https://forums.powershell.org/t/createing-an-iis-webapppool-properties-do-not-set/2903
**Category:** DSC
**Created:** [July 30, 2014, 3:12am UTC](https://forums.powershell.org/t/createing-an-iis-webapppool-properties-do-not-set/2903 "2014-07-30T03:12:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bruce-williams](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bruce-williams](https://forums.powershell.org/u/bruce-williams)
#### Post date: [July 30, 2014, 3:12am UTC](https://forums.powershell.org/t/createing-an-iis-webapppool-properties-do-not-set/2903/1 "2014-07-30T03:12:01Z")

</div>

Has anyone run accross the this,  
When I use the following the code any script beyond the new-webAppPool does not get executed.  
I can run it when I test it as a standalone function but, no go with in the dsc resource.

Set-Target Resource  
{  
Param(  
[system.string]$name  
[system.string]$RuntimeVersion  
)

…other code

```
write-verbose('Create New WeAppPool $name")
new-WebAppPool -name $name

write-verbose('Set RuntimeVersion)
Set-ItemProperty -Path IIS:\\AppPools\$name ManageRunTimeVersion $RunTimeVersion

```

…other set-itemproperty (I’ve also tried : & $env:windir\system32\inetsrv\appcmd.exe)

}

---

<div class="post-metadata">

### Author: ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)
#### Post date: [July 30, 2014, 11:51pm UTC](https://forums.powershell.org/t/createing-an-iis-webapppool-properties-do-not-set/2903/2 "2014-07-30T23:51:15Z")

</div>

So, my first suspect is usually permissions, since the LCM runs as SYSTEM. Have you looked at that?

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/createing-an-iis-webapppool-properties-do-not-set/2903/3 "2024-05-16T21:17:36Z")

</div>


