WEBVTT

00:06.460 --> 00:14.300
You have learned that objects contain members and that those members consist of properties methods anti-wealth

00:14.600 --> 00:19.420
to this point to this course you have used properties of objects.

00:19.420 --> 00:27.460
Now you will be able to use methods methods tell an object to perform some action or task repository

00:27.460 --> 00:37.000
or objects that you Querrey with WMI or see him frequently have methods that reconfigure their manageable

00:37.180 --> 00:40.900
components that the objects represent.

00:40.930 --> 00:48.810
For example that re-inserted to discuss service class-C instances represent background services.

00:48.850 --> 00:58.690
The class a change method that reconfigures many of the settings for a service that include its logon

00:58.690 --> 01:02.260
password name and start mode.

01:02.260 --> 01:09.940
If you know the class that represents the manageable component that you want to reconfigure you can

01:09.940 --> 01:17.410
discover the methods of that class by use and get mamber for example get WMI object.

01:17.440 --> 01:23.930
This class Winsford to discuss service pipe get member or GM.

01:23.950 --> 01:28.090
The resulting list will display all available methods.

01:28.090 --> 01:31.990
Remember that not every class or for small sets.

01:32.020 --> 01:35.680
So sometimes the list may not include any methods.

01:35.800 --> 01:44.260
The output of get member does not explain how to use the methods unless you are already know how to

01:44.260 --> 01:45.010
use them.

01:45.040 --> 01:47.980
You have to find the documentation for the class.

01:48.070 --> 01:50.550
The same technique will not work with.

01:50.550 --> 01:58.780
Get some instance because the objects are returned by that command do not have a complete set of methods.

01:58.780 --> 02:01.710
Instead you would run this command.

02:01.810 --> 02:10.920
Get some class first class to do just cause service by select object Desch expand property.

02:10.990 --> 02:12.840
Same class methods.

02:12.850 --> 02:18.910
There is no efficient way to search across all classes for a given method.

02:19.000 --> 02:26.980
To do this in Windows POAs shell you would have to wear it every class by each one to get mamber and

02:26.980 --> 02:31.880
search that output for a method name or keyword.

02:31.900 --> 02:39.330
This approach would be very time consuming and impractical and Internet search engine would pro-white

02:39.460 --> 02:44.160
faster and easier way to search for classes and methods.

02:44.170 --> 02:52.720
So let's talk a bit about in documentation method documentation if any exists will be included on the

02:52.720 --> 02:56.650
documentation or web page on the repository class.

02:56.650 --> 03:02.190
Remember that repository classes are not typically well documented.

03:02.350 --> 03:10.090
Especially classes not in their root seem the two namespace and Internet search engine is the fastest

03:10.090 --> 03:16.070
way to find the documentation for a class after the class name into a search engine.

03:16.090 --> 03:23.830
And one of the first few search results will typically be the class documentation page.

03:23.860 --> 03:28.110
The documentation page will include a section named Masset.

03:28.200 --> 03:30.880
There are other classmates that are listed.

03:30.880 --> 03:36.090
You can click any method name to display instructions for using that method.

03:36.250 --> 03:42.760
They mainly use all the documentation is to determine that arguments each message requires.

03:42.760 --> 03:50.760
For example the re-inserted to shut down method or that when so to underscore operating system class

03:51.000 --> 03:53.560
except as a single argument.

03:53.620 --> 03:58.150
The argument is an integer and it lets the Masset.

03:58.270 --> 04:02.990
What kind of shut down restart or other action to take.

04:03.100 --> 04:10.240
Well let's take a look at some demonstration examples you'll see how to discover class methods and how

04:10.240 --> 04:12.350
to find their documentation.

04:12.430 --> 04:22.090
So to display the members of re-inserted to underscore service class just type get WMI object the class

04:22.090 --> 04:27.430
name re-inserted to underscore service and pipe it to get mamber.

04:27.490 --> 04:30.760
Here you can find change method for example.

04:30.850 --> 04:39.040
So to use Windows powers cell to display the definition for change method of VIN so to to service type

04:39.280 --> 04:49.350
got WMI object class re-inserted to service by GET member pipe their name equals change and pyper to

04:49.350 --> 04:52.690
form a list by name and definition.

04:52.690 --> 05:00.070
Now let's find online documentation for the change set of incertitude service you have to open a web

05:00.070 --> 05:09.690
browser go to some search engine like Google or bin and events or to to discuss service as a search

05:09.750 --> 05:17.110
term in the search result click Vincit to underscore a service class for Windows.

05:17.250 --> 05:24.900
And you could find and I'm as dn documentation page and read about this method.

05:24.990 --> 05:30.740
So scroll down to the mansard section list and then click change.

05:30.780 --> 05:38.010
You can find that the method has 11 parameters and you can review all these parameters.
