Warning: Creating default object from empty value in /home/platne/serwer68747/public_html/blog.porowski.pro/wp-content/themes/smartblog/framework/admin/redux-framework/inc/class.redux_filesystem.php on line 29
IIS Archives | Dariusz Porowski {Tech} Blog
Top Menu

Tag Archives IIS

One of the best practices is run Windows Azure Pack Application Pools on dedicated account. WAP has quite a lot Application Pools and changing each manually is not very comfortable. You can do bulk change using below PowerShell script (Assumption: You use the same identity for each AppPool).

### Change the variables to fit your environment
$userName = "domain\username"
$password = "password"

### Let's start the party!
Import-Module WebAdministration
$appPools = Get-ChildItem IIS:\AppPools | where { $_.Name -like "MgmtSvc-*" }
foreach($appPool in $appPools)
    $appPool.processModel.userName = $userName
    $appPool.processModel.password = $password
    $appPool.processModel.identityType = 3
    $appPool | Set-Item
    $name = $appPool.name
    Write-Host "$name updated..." -ForegroundColor Green
Write-Host "Done!" -ForegroundColor Yellow

Of course you can easily customize the script to other things than the WAP by changing the condition 🙂