1 00:00:06,470 --> 00:00:10,540 Deleting user accounts inactive directory power shall module. 2 00:00:10,600 --> 00:00:17,290 There is a command led call to remove the user to delete user accounts from Active Directory. 3 00:00:17,590 --> 00:00:26,280 Alternatively the removed as a the object command led can be used to remove a the user command letters 4 00:00:26,350 --> 00:00:29,030 designed to deal with user accounts. 5 00:00:29,050 --> 00:00:30,740 Removal will you. 6 00:00:30,740 --> 00:00:34,300 This command led throughout the examples in this lesson. 7 00:00:34,570 --> 00:00:42,190 Sometimes the request for removal of user accounts are very often especially if the organization is 8 00:00:42,190 --> 00:00:50,320 quite large and an I.T. person gets request to delete user accounts on a frequent basis either when 9 00:00:50,320 --> 00:00:56,310 an employee leaves the organization or they turn down the offer a job. 10 00:00:56,320 --> 00:01:04,440 Before joining though most of organizations won't delete user accounts when an employee leaves the organization. 11 00:01:04,450 --> 00:01:12,880 Instead they will hide this from the global address list or book remove them from all groups disable 12 00:01:12,880 --> 00:01:17,560 the mailbox and keep their I.D. in a disabled state. 13 00:01:17,560 --> 00:01:25,570 Such accounts can be enabled if the employee rejoins the company later which happens quite often and 14 00:01:25,570 --> 00:01:30,690 spares much time and effort for the I.T. person. 15 00:01:30,730 --> 00:01:35,680 Removing a user account from Active Directory is a straightforward process. 16 00:01:35,710 --> 00:01:41,260 You just need to posit a distinguish name or DRM or object. 17 00:01:41,300 --> 00:01:49,880 Do you idea or see it or same account name to the identity parameter of the remove a user command led. 18 00:01:50,080 --> 00:01:59,650 So let's remove some user will type removed say the user identity lab user for when this command is 19 00:01:59,650 --> 00:02:00,470 executive. 20 00:02:00,550 --> 00:02:06,040 It will ask for confirmation of deletion since deletion is a critical operation. 21 00:02:06,310 --> 00:02:09,240 Active Directory module warns about it. 22 00:02:09,400 --> 00:02:16,270 If you are certain that the inputs are correct and you don't want to get prompted for confirmation said 23 00:02:16,270 --> 00:02:20,970 the confirmed parameter and while to it false. 24 00:02:21,220 --> 00:02:30,770 So lets type remove this at a user identity lab user of 5 and confirm parameter with false value similar 25 00:02:30,770 --> 00:02:38,020 relate to delete user accounts by reading from a text file we can use the following command. 26 00:02:38,080 --> 00:02:47,930 Get content from the text file and pipe it to the following code for each user in this file do the following. 27 00:02:47,980 --> 00:02:56,210 Remove the user with identity parameter from the file and as a confirmed parameter. 28 00:02:56,260 --> 00:03:04,510 Get content command lat reads the user names from user dot extend and passes them to the remove the 29 00:03:04,510 --> 00:03:08,850 user command led to delete the accounts one after another.