SQL Server: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Nuclear Remove SQL Server == Trying to uninstall SQL Server gives this error: SQL Server cannot be uninstalled because the following products are installed... See what is installed: <pre> Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*SQL Server*" } | Select-Object Name, IdentifyingNumber </pre> Nuke it all: <pre> Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*SQL Server*" } | ForEach-Object { Write-Host "Uninstalling..." |
No edit summary |
||
| Line 16: | Line 16: | ||
} | } | ||
</pre> | </pre> | ||
NOTE: I had to run it twice, due to dependencies... | |||
Latest revision as of 21:25, 27 November 2026
Nuclear Remove SQL Server
Trying to uninstall SQL Server gives this error:
SQL Server cannot be uninstalled because the following products are installed...
See what is installed:
Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*SQL Server*" } | Select-Object Name, IdentifyingNumber
Nuke it all:
Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*SQL Server*" } | ForEach-Object {
Write-Host "Uninstalling $($_.Name)..."
Start-Process "msiexec.exe" -ArgumentList "/x $($_.IdentifyingNumber) /qn /norestart" -Wait
}
NOTE: I had to run it twice, due to dependencies...