Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Setting application pool with Set-ItemProperty doesn't work in IIS 8?

$
0
0

I discovered that my automated deployment PowerShell script does not work in Windows Server 2012 / IIS 8. What's interesting is that the only thing that doesn't work is setting the application pool via Get-ItemProperty. The command runs OK, but it doesn't actually do anything. The code is like this:

import-module WebAdministration
$appPool = "IIS:\AppPools\NewPool"
$sitePath = "IIS:\Sites\Default Web Site\DemoSite"

# Check the current pool with
# Get-Itemproperty $sitePath ApplicationPool

# Change the pool:
Set-ItemProperty -path $sitePath -name ApplicationPool -value $appPool.Name

On Server 2008 R2 the Set-ItemProperty call works like it should, but in 2012 it exists normally without actually doing anything to the application pool. I checked that the issue exists also in Windows 8, so it's either Windows 8 / Windows 2012 and IIS 8 that seems to be the culprit here, as 2008 R2 works also after upgrading PowerShell to version 3.0.

Has anyone else run into this issue? Any help would be appreciated, as this is currently blocking otherwise functional automation.


Viewing all articles
Browse latest Browse all 27852

Trending Articles



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