Import-Module WebAdministration
$site = Get-Website | Where-Object { $_.Name -like "*Deploy*" -or $_.PhysicalPath -like "*DeployPro*" } | Select-Object -First 1
if ($site) {
    Write-Host "Recycling pool: $($site.ApplicationPool)"
    Restart-WebAppPool $site.ApplicationPool
    Start-Sleep -Seconds 2
    Write-Host "Done. Site state: $((Get-Website -Name $site.Name).State)"
} else {
    Write-Host "Site not found. All sites:"
    Get-Website | Select-Object Name,PhysicalPath,ApplicationPool,State | Format-Table -AutoSize
}
