SQLSERVER PSdrive and wmi warning

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 3 months ago.

  • Author
    Posts
  • #64098
    Profile photo of Salam ELIAS
    Salam ELIAS
    Participant

    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

  • #64398
    Profile photo of Don Jones
    Don Jones
    Keymaster

    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.

You must be logged in to reply to this topic.