Freigeben über


SQL Server Configuration Manager error "Invalid class [0x80041010]" on Visual Studio gallery image VM

If you are using the Visual Studio 2013 Gallery image for MSDN subscribers to create an Azure VM and try running SQL Server Configuration Manager without taking additional configuration steps first, you may see the following error message:

Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager. Invalid class [0x80041010]

 

To resolve this issue, right-click the PowerShell shortcut on the taskbar, click Run as Administrator, copy the command below to the clipboard, right-click the PowerShell window to paste it, then hit ENTER to run the script.

C:\ConfigureDeveloperDesktop\Scripts\ConfigureSQLServer.ps1

It will take a few minutes because it is installing SQL Server Developer Edition, but when the script finishes can launch SQL Server Configuration Manager without error.

For more information see Configure SQL Server for SQL and BI development environment (there is a shortcut to that page on the desktop of the Visual Studio images).

Only the minimal LocalDB version is installed in the image by default since that satisfies most local development requirements and most Visual Studio templates choose LocalDB as the default database backend. LocalDB doesn’t require further configuration and should just work after VM creation.

Note that while you may be able to get around the error with the command below (for example, as referenced here), it is recommended that you instead run the PowerShell script referenced above to properly configure SQL Server on VMs created from the Visual Studio gallery images.

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