The following code demonstrates what I thought might work, but it doesn't change the app pool - it remains set at its current value (even though the $site object does update):
import-module WebAdministration
$site = get-item "IIS:\Sites\Project"
$site.ApplicationPool = "ProjectAppPool"
$site | set-item
If you create the site with New-WebSite specifying the -ApplicationPool parameter, it creates as expected. What Powershell IIS web command must I use to change an existing site's app pool to something different?