1 00:00:00,270 --> 00:00:06,960 So in this video, first we were looking at the groups and will be retrieving the group information 2 00:00:06,960 --> 00:00:07,770 using this feature. 3 00:00:08,460 --> 00:00:17,090 So let's net group domain admins and here can see we have one user administrator when I go to add to 4 00:00:17,120 --> 00:00:18,510 their users and computers. 5 00:00:19,260 --> 00:00:20,950 And so right. 6 00:00:21,330 --> 00:00:22,800 Work on this between admins. 7 00:00:25,260 --> 00:00:28,350 So this is a member of administrator and this one. 8 00:00:29,430 --> 00:00:33,900 And if you go to the members and you can see along with the administrator, there is a group called 9 00:00:33,900 --> 00:00:34,260 upon. 10 00:00:34,770 --> 00:00:38,970 Whenever I go to the Commander Group, I don't see that one group here. 11 00:00:39,780 --> 00:00:45,540 So what happens is to only fetch the users from this list. 12 00:00:46,650 --> 00:00:51,630 And also in this group, you should click on this, go to the members and you can see there is another 13 00:00:51,630 --> 00:00:54,020 group nested upon and there is a user Pashtu. 14 00:00:54,270 --> 00:01:02,070 So if you own that user, then your directory, the Roman admin and directly this nested pun and you're 15 00:01:02,070 --> 00:01:03,360 going to see the members just one. 16 00:01:03,780 --> 00:01:12,540 And if you bother to share this information, we're not using the net group. 17 00:01:13,440 --> 00:01:17,610 You can also use the power view and you need to pass the recorder to optional. 18 00:01:17,610 --> 00:01:17,910 Yes. 19 00:01:18,540 --> 00:01:22,200 So you need to do some extra effort to find all of these groups. 20 00:01:22,710 --> 00:01:29,400 So in this video will be using the Sheesha to get all of the nested groups and users as well. 21 00:01:31,590 --> 00:01:40,620 So if I switch right, the function that is accessible to the members of the class and that is why we 22 00:01:40,620 --> 00:01:43,110 are just printing out the value. 23 00:01:43,110 --> 00:01:44,880 So not any return type. 24 00:01:46,020 --> 00:01:48,600 So get our members. 25 00:01:50,280 --> 00:01:52,970 So the first alphabet should be character. 26 00:01:52,980 --> 00:01:55,200 That is the convention in the future. 27 00:01:56,100 --> 00:02:00,420 And the first string I want to first argument is that it's a group name. 28 00:02:38,660 --> 00:02:43,280 So we'll be putting the group name and the second argument as that domain name. 29 00:02:47,640 --> 00:02:49,770 So we'll be using the function called group. 30 00:02:50,820 --> 00:02:54,300 Before that, we'll be importing all of this namespaces. 31 00:02:54,780 --> 00:02:56,190 First one is buried reserves. 32 00:02:56,190 --> 00:03:01,880 This production management and second one inspectors are revert back to but deferred. 33 00:03:01,890 --> 00:03:03,090 These are not important. 34 00:03:03,660 --> 00:03:06,920 Right click on the product and go to their reference. 35 00:03:07,410 --> 00:03:14,050 So in this reference, check the checkboxes for the corresponding add order to the resource and cannot 36 00:03:14,070 --> 00:03:14,270 get. 37 00:03:14,290 --> 00:03:15,120 So here we go. 38 00:03:15,360 --> 00:03:17,280 So take on this and click on target. 39 00:03:17,790 --> 00:03:20,840 Now you can import these names business not. 40 00:03:20,990 --> 00:03:29,520 And so there is group principal dot find by identity. 41 00:03:50,310 --> 00:03:51,350 So group inspired. 42 00:03:51,600 --> 00:03:52,830 Defined by identity. 43 00:03:52,860 --> 00:03:57,720 We'll find by the group name by that given spring. 44 00:03:58,110 --> 00:04:02,130 So the first argument has been the context on which context to find. 45 00:04:02,640 --> 00:04:07,290 We need to find both the main and second one in the spring when the group name you want to find. 46 00:04:07,950 --> 00:04:13,230 So before that, we need to make one principal context object. 47 00:04:13,440 --> 00:04:17,280 Let's say a piece equals two new principal context. 48 00:04:18,690 --> 00:04:26,670 Now, if you hold control and click on this, there are a few constructors you can pass. 49 00:04:27,720 --> 00:04:29,910 The principal context of context type. 50 00:04:30,210 --> 00:04:31,940 So we'll be choosing the context type. 51 00:04:31,950 --> 00:04:36,600 But between for this and the string name and the container is the name of the puzzle. 52 00:04:37,500 --> 00:04:38,460 You can also 53 00:04:42,990 --> 00:04:50,520 just again pass the username and password as well, but we'll be just running the XY on the machine 54 00:04:50,520 --> 00:04:54,770 directly under your domain user command prompt. 55 00:04:54,780 --> 00:04:59,460 So I will be just passing the first one context type. 56 00:05:02,080 --> 00:05:02,390 DOT. 57 00:05:02,500 --> 00:05:07,030 And you can see there are three options application territory and domain. 58 00:05:07,120 --> 00:05:09,910 This is a radius, so we'll be choosing this one. 59 00:05:10,360 --> 00:05:13,450 And the second one is the domain name. 60 00:05:13,450 --> 00:05:16,300 That is spec section and that is my domain. 61 00:05:17,230 --> 00:05:24,160 Since we have posted this value in the domain name argument so we can just say domain name, you should 62 00:05:24,160 --> 00:05:25,840 have my position under. 63 00:05:26,890 --> 00:05:28,840 Now depends what context object is ready. 64 00:05:28,850 --> 00:05:33,480 You can pass this object to here and from this store. 65 00:05:34,390 --> 00:05:36,580 Search for the winner advance. 66 00:05:39,340 --> 00:05:40,690 Roman at Windsor Castle. 67 00:05:41,170 --> 00:05:45,310 This, in case you intend to do so, you can also pass as my audience. 68 00:05:45,310 --> 00:05:52,060 MARTINEZ But since we're watching the group name, I'm just building this let's a group name and return 69 00:05:52,060 --> 00:06:00,660 date we can hold on to this group identity and the return type is groupings but there a groupings per 70 00:06:00,670 --> 00:06:01,080 object. 71 00:06:01,210 --> 00:06:01,390 Okay. 72 00:06:02,670 --> 00:06:08,680 It's said group principal GP is equal to group principal object. 73 00:06:09,850 --> 00:06:17,140 Now you need to find what are the methods available in this GP so GP Dart and here you see the context. 74 00:06:17,830 --> 00:06:23,710 You will get this context and discipline them, distinguishing them so you get the group information 75 00:06:23,710 --> 00:06:24,190 as well. 76 00:06:25,150 --> 00:06:33,860 So one important function we are focusing is get members and if you hold on to this button and baby's 77 00:06:33,940 --> 00:06:45,370 principle search results so it's there stare at it so you can look using the forage principle group 78 00:06:46,480 --> 00:06:53,980 in group GP that numbers so this get members will get all the members including the user and the group 79 00:06:54,490 --> 00:07:02,020 so we can just say group that so here you can see that description display name listing issue and then 80 00:07:02,020 --> 00:07:07,120 we can also put into the food issues them see in our booth this year. 81 00:07:09,990 --> 00:07:13,560 And you can also get groups for this group as well. 82 00:07:13,830 --> 00:07:16,020 So first, let's just print their name. 83 00:07:18,690 --> 00:07:22,140 And be providing the and arguments to this program. 84 00:07:22,980 --> 00:07:27,560 So first one is a group name which is provided by the first argument. 85 00:07:27,810 --> 00:07:29,290 It's our zero. 86 00:07:29,460 --> 00:07:34,170 That is the first argument and domain name. 87 00:07:34,440 --> 00:07:38,190 So in other programming languages, the first argument is file name. 88 00:07:38,190 --> 00:07:43,140 But here the first argument is also dialogue and we need to create. 89 00:07:43,530 --> 00:07:45,240 So here this is the class one. 90 00:07:45,270 --> 00:07:50,460 We have functions that is get our and the main function we need to create object of class. 91 00:07:50,730 --> 00:07:53,910 Class one and we'll be calling this our members. 92 00:07:54,330 --> 00:07:58,230 So to take class one CS equals to new class. 93 00:07:59,610 --> 00:08:00,930 So we are declared object. 94 00:08:00,930 --> 00:08:05,590 When I say a C that you can see here the members that are members. 95 00:08:05,610 --> 00:08:07,740 That is the function and you need to pass. 96 00:08:08,190 --> 00:08:08,970 Group name. 97 00:08:08,970 --> 00:08:10,260 Common domain name. 98 00:08:11,610 --> 00:08:16,900 So this will go and pass the group member whenever name values for this. 99 00:08:16,920 --> 00:08:23,010 Get our members and we'll be finding the group by the group name in the context of this domain. 100 00:08:24,060 --> 00:08:26,100 And we will printing this name for no. 101 00:08:26,100 --> 00:08:27,300 Let's build the solution. 102 00:08:30,450 --> 00:08:31,530 So let's copy this. 103 00:08:32,400 --> 00:08:37,110 You can also right click on this product and click on this open for Forex photo. 104 00:08:42,170 --> 00:08:50,470 So that group that you sexy and domain admins and tacticians and not local. 105 00:08:53,860 --> 00:08:54,210 Okay. 106 00:08:54,250 --> 00:09:00,310 So you can see administrator and you know, you can see the point, but you don't know whether it is 107 00:09:00,310 --> 00:09:02,280 the person, is the user or the group. 108 00:09:02,290 --> 00:09:06,220 So what you can do is you can print out the type of this object. 109 00:09:08,230 --> 00:09:18,820 So if there is one group that is structured structure object, sorry, so group but structure object 110 00:09:19,000 --> 00:09:23,520 returns whether it is user or group, if it's user. 111 00:09:25,150 --> 00:09:26,380 Now we can just say. 112 00:09:37,480 --> 00:09:38,140 User. 113 00:09:46,810 --> 00:09:49,240 Oh, that's a bad name. 114 00:09:50,760 --> 00:09:53,700 So we are just printing this as a username. 115 00:09:55,080 --> 00:09:56,550 So let me read this one. 116 00:09:57,130 --> 00:10:03,900 Are we going to see if a group about structure objects is equal to group? 117 00:10:04,740 --> 00:10:05,340 And then. 118 00:10:07,930 --> 00:10:09,080 You know, printing. 119 00:10:12,170 --> 00:10:12,500 Group. 120 00:10:19,810 --> 00:10:20,920 So let's build this one. 121 00:10:32,810 --> 00:10:35,060 And now you can see we've got the user group. 122 00:10:35,420 --> 00:10:42,020 Now, what we need to find is are the members of the group and all are the members are the group of 123 00:10:42,020 --> 00:10:42,470 this group. 124 00:10:42,950 --> 00:10:46,760 So you need to find recursively at the end of the tree. 125 00:10:47,270 --> 00:10:53,900 So what you can do is after printing this, you can call the same function that are members here. 126 00:10:54,080 --> 00:10:55,520 So this is the call recursion. 127 00:10:55,520 --> 00:10:58,550 You get all members off. 128 00:10:58,880 --> 00:11:01,000 Now you need to pass the group name. 129 00:11:01,010 --> 00:11:04,460 So the group name is the group that name. 130 00:11:05,120 --> 00:11:08,240 And the second one is normal domain name, which is a constant. 131 00:11:09,980 --> 00:11:12,560 So first will be finding the groups of domain admins. 132 00:11:12,710 --> 00:11:20,450 And if there is any other group in this domain that means group, then we will finding again the members 133 00:11:20,480 --> 00:11:21,320 of the group. 134 00:11:21,800 --> 00:11:22,550 That is point. 135 00:11:26,440 --> 00:11:27,310 So let's go. 136 00:11:27,310 --> 00:11:27,700 And. 137 00:11:30,280 --> 00:11:39,220 And this one I know you can see me have Groupon and user tissue and the group next to the bond and the 138 00:11:39,220 --> 00:11:39,940 user test one. 139 00:11:40,090 --> 00:11:42,430 But there is a slight confusion. 140 00:11:42,640 --> 00:11:47,740 We don't know whether this is testes, number of bond or something. 141 00:11:47,890 --> 00:11:54,820 So what we can do is we can print the parent group from here so we can say a user. 142 00:11:58,440 --> 00:11:59,940 So then say. 143 00:12:02,670 --> 00:12:07,680 GREENE He's a member of. 144 00:12:12,880 --> 00:12:21,040 So the group that name is the current charity group and this group name is the parent group. 145 00:12:22,330 --> 00:12:23,110 Group name. 146 00:12:27,840 --> 00:12:28,860 So they should be fine. 147 00:12:28,890 --> 00:12:33,540 Let's build a solution and copy here. 148 00:12:34,560 --> 00:12:35,520 And here you can see. 149 00:12:36,030 --> 00:12:43,350 Oh, User Administrator Groupon is memorable domain admins and the push to start a Barneys monograph 150 00:12:43,350 --> 00:12:43,950 contest. 151 00:12:43,950 --> 00:12:46,140 One sort of torso. 152 00:12:46,440 --> 00:12:53,160 Martha This user is member of one. 153 00:12:53,520 --> 00:12:57,480 So this is the ah, it's a group name. 154 00:12:57,960 --> 00:12:59,040 So they should do fine. 155 00:13:07,230 --> 00:13:12,930 And now we can see we got all the users and the groups you can see. 156 00:13:12,930 --> 00:13:22,410 Username is also a member of the group, so this gives you perfect clarity of what are the users present 157 00:13:22,500 --> 00:13:26,190 and users in the groups present under that particular group. 158 00:13:26,580 --> 00:13:36,090 So it's a remote desktop users and there is only one user that is attached to member of my desktop business. 159 00:13:37,320 --> 00:13:38,640 So that's it for this video. 160 00:13:39,060 --> 00:13:48,020 So you need to enumerate everything you order to leave a smart piece of information also.