Top Menu

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 🙂

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close