Author Posts

February 13, 2017 at 3:19 pm

I am connecting to sql using

cd SQLSERVER:\SQL\sql2k12\DEFAULT\

Or

Get-ChildItem SQLSERVER:\SQL\sql2k12\DEFAULT\Databases\AdventureWorks2012\Tables

Results come back correctly but before the results displayed, I have several warnings in orange colors as follows

WARNING: Could not obtain SQL Server Service information. An attempt to connect to WMI on 'sql2k12' failed with the following error: SQL Server WMI provider is not available on sql2k12. –> Invalid namespace
WARNING: Could not obtain SQL Server Service information. An attempt to connect to WMI on 'sql2k12' failed with the follo
wing error: SQL Server WMI provider is not available on sql2k12. –> Invalid namespace

I read some threads, configured the user in DCOM config .....but still getting this annoying warnings

February 16, 2017 at 2:53 pm

SQL Server 2012 no longer supports that WMI namespace, but the SQLSERVER: provider in PowerShell still attempts to use it. You can set $WarningPreference to suppress the warning messages, but this is something Microsoft would need to fix.