Aqui está o script para a posteridade usando o WebAdministration:
Import-Module WebAdministration
#Find all applications below AppName in site SiteName, convert them to virtual directories
$RootAppName = 'AppName'
$SiteName = 'SiteName'
$SitePath = 'IIS:\Sites\' + $SiteName
cd $SitePath
dir | Where { [Regex]::IsMatch($_.Name, $RootAppName + '\') } | Foreach {
$AppName = $_.Name
$PhysicalPath = $_.PhysicalPath
Remove-WebApplication -Name $AppName -Site $SiteName
Write-Host 'Removing application' $AppName 'from site' $SiteName
New-WebVirtualDirectory -Site $SiteName -Name $AppName -PhysicalPath $PhysicalPath
Write-Host 'Adding virtual directory' $AppName 'to site' $SiteName 'at path' $PhysicalPath
}