Powershell Script to check if SQL is Installed
Reading Time: < 1 minuteHere we go, short but sweet. I had to come up with this today when working with a SQL Server compliance item in SCCM 2012 using a script detection method. I’ve added the else back in, but you can modify however you need.
if (Test-Path “HKLM:\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL”) {
write-host “True”
} Else {
write-host “False”
}
I hope I’ve made your day, at least a little bit easier!
May 22, 2017 at 12:14 am
Thanks!
February 19, 2018 at 10:14 am
This was helpful! thanks!