Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMI namespace incorrect on "Working with the WMI Provider for Configuration Management" #1817

Closed
rrg92 opened this Issue Mar 24, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@rrg92
Copy link

commented Mar 24, 2019

On file working-with-the-wmi-provider-for-configuration-management.md the wmi namespace seems incorrect...

Doing a little powershell script to return all wmi namespaces, and filtering just which contains "SqlServer" on name, we have following in a computer with SQL Server 2016 and SQL Server 2014 installed:

image

The "ComputerManagementXX" dont have childs for the instance...

Just with the "ServerEvents", we have a child with instance name...

@MightyPen

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

@rrg92 Hello, I half understand what your core point is, but I need to be more clearly certain.

Request: Can you please enter another comment to directly state what the problem is that may need fixing? In the comment, please @ notify me MightyPen.

 

In many articles that show directory paths, the pathing on our test computer may well differ from the pathing on a customer's computer, due to any number of factors. Often the articles are giving a plausible example of the pathing to expect, and not necessarily the exact pathing that all computers will have. I am unsure whether this is part of what this Issue 1817 is directly concerned about?

Thank you.


Here is the https URL link to the article in question:

Here is the GitHub branch=master link to the same article:

@rrg92

This comment has been minimized.

Copy link
Author

commented Mar 25, 2019

Hellow @MightyPen!

I will try to be more clear and precise:

I've highlighted the parts needs to be fixed and do a fork with commit to proposed changes.

image

The path mentioned on documentation is not a directory path, but a WMI namespace. These namespaces have same structure of a directory path. But some parts dont exists:

  • In some tools, namespaces dont start with "\\.". It must start with "root". This is case of powershell. I guess this must be clear to the reader, because most of SQL Server users with query WMI using powershell:

When using \. at start of namespace path, powershell code result in error: INVALID WMI NAMESPACE!
image

Without \.\ part, it runs successfully
image

  • The ComputerManagement12 part of example path can change according SQL Server version installed. For example, if the computer have installed SQL Server 2016 and SQL Server 2014 with exists following namespaces. I guess documentation must inform this part to users correctly build path according theirs needs:
root\Microsoft\SqlServer\ComputerManagement13
root\Microsoft\SqlServer\ComputerManagement12

The format is:

root\Microsoft\SqlServer\ComputerManagementXX  

where XX is the major version of SQL Server tool installed. For example, the major version for SQL Server 2016 is 13, and, because this, there are a namespace root\Microsoft\SqlServer\ComputerManagement13. To keep more precise, you can add following sample powershell code to user get all available namespaces on machine:

Get-WmiObject -ns 'root\Microsoft\SqlServer' __NAMESPACE | ? { $_.name -match 'ComputerManagement' } | select name

Here, a sample output in a computer with just SQL Server 2016 installed:

image

Another example in a computer running SQL Server 2012 and 2008:

image

  • The part "\instance" dont exists for namespace root\Microsoft\ComputerManagementXX (where XX is version number) in any computer with SQL Server installation. Current doc mentions the use of "\instance" where instance is the instance name. This part of path dont exists for namespace root\Microsoft\ComputerManagementXX. It exists just for namespace root\Microsoft\SqlServer\ServerEvents, but a i Guess the "ServerEvents" namespace is beyond of scope of this page.

rrg92 added a commit to rrg92/sql-docs that referenced this issue Mar 25, 2019

@MightyPen

This comment has been minimized.

Copy link
Contributor

commented Mar 28, 2019

@rrg92 Thanks much for this excellent explanation, and for the referenced commit that shows the specific improvements that you recommend.
I will take a close look at the info you have provided.

@MightyPen

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

Fixed.
Fix should be on live Docs by or before afternoon of Monday April/15.
Private PR =
MicrosoftDocs/sql-docs-pr#9838

( Helpful was: https://github.com/rrg92/sql-docs/commit/3d518bfc0d55f819c762abc3e5c5c9eed85abe94 )

@rrg92 Thanks again for your exceptionally good inputs on this problem. :-)
I am now Closing this PR 1817.

@MightyPen

This comment has been minimized.

Copy link
Contributor

commented Apr 14, 2019

@rrg92 The 'Contributors' photo circles are taken from Pull Requests that are created when the customer clicks the "Edit"-pencil icon at the top-right of the article - and then if the PR is accepted and merged.
These PRs are created in repo 'MicrosoftDocs/sql-docs'.

One hitch is that we often want to slightly modify the customer's PR before merging it. Some Writers feel that modification activity is tricky, or they rarely do it and cannot easily remember exactly how it should be done.
Or is the size of the modifications are relatively large, it becomes easier for the Writer to create a new "private repo" PR (in 'sql-docs-pr'), which then does not lead to the photo circle that the public PR would have.
Or sometimes the customer will make a PR that is kinda incomplete or a bit sloppy or inexact. So again it could be easier for the Writer to create a fresh new private PR. (We are always swamped with more work than we can ever complete, so speed and ease are major factors.)
No system is perfect.

As I recall, this Issue 1817 referred to a Commit that was something other than a PR created by you by your having clicked the "Edit"-pencil icon.

Thanks.
. .

@rrg92

This comment has been minimized.

Copy link
Author

commented Apr 14, 2019

All right @MightyPen !!
I would like to see my profile appears on official docs!! =)

But, I perfectly understood all you say!
Thanks for explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.