Authenticating WMI Requests

Your code often will make WMI queries to remote servers. In most of these cases, you’ll have to authenticate to the remote servers. This section talks about doing that.

The biggest difference between the code you’re going to look at now and the examples you’ve already seen is that this next example uses a ManagementObject constructor that takes an additional argument in its constructor. The constructor used takes a ManagementScope object and a ManagementPath object. The examples in the previous section only specified a ManagementPath.

The ManagementScope object is used to specify information with regard to the remote server. The code in Listing 19.3 shows how to create a ManagementScope object. The constructor used ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.