Home Forums Programming Powershell powershell WMI error: "Could not obtain SQL Server Service information. An attempt to connect to WMI ... failed with the following error: access is denied." RE: powershell WMI error: "Could not obtain SQL Server Service information. An attempt to connect to WMI ... failed with the following error: access is denied."

  • I had the same issue and fixed it.

    My problem was when launching Configuration Manager I got an error message in relation to WMI which actually caused the problem you saw in powershell. After I ran:

    mofcomp "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

    Both issues were fixed. I am running sql2008 r2 on win 2008 r2. You might need to change the path above.

    By the way, why I found out this was because I tried to connect to a different instance on a different server, I didn't get the error. And that reminded me checking Configuration Manager because I had this issue before.

    Let me know if this is also the case for you.