EASY! Command To Export Users From Active Directory Group To CSV Excel File

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good and welcome to the channel in this short video we are going to explain how to export users from a particular group into an Excel file this is a common enough problem for it administrators because you might have somebody ask you for a list of who's in a particular group and if you just go in and you're just trying to be lazy about it and you take a look at the list you can see they don't know if it on one screen so well you can take screenshots and pledge them together but it's kind of not very professional now it would be great if you could just right click on any particular group and select export list but it doesn't work that way unfortunately if you try to right click on a group even under all tasks there's nothing there even if you go into advanced options there's still nothing there so when you go back if there's still no way to export this directly out of the GUI so how do you do it well it's not very hard bring up a Powershell run it as an administrator which I simply do by right clicking and selecting Windows Powershell admin you can bring it up the other way or any other way you'd like for that matter and the command is as follows it's a simple get 80 group and I just tab complete through this there we go get remember identity I just type in the first little bit press Tab and then which group well I want to get the group called VPN users now if I press tab here nothing happens because it's in quotes and it's a variable so it won't work you have to type the whole thing in so let's just do that and press enter and it will work but it's kind of ugly so not a good solution so let's write command again uh you probably know you can just press the up arrow on your keyboard to have it bring up the command again but you could just type it from scratch and so what I'm going to do here is I'm going to then use a pipe pipe is the shift and the slash key above the enter key on your keyboard if you're not familiar with the pipes and what we want to do is select the column so we type in select them press tab there to complete that and which columns so I see there's a column here called name there's a column here called Sam account name and there's also the distinguished name the rest of this I really don't care about so let's say I just care about the Sam account name and the name I don't care about the others let's just use those so I can type a name comma Sam count name it's not case sensitive now boom there it goes that's kind of nice right it exported it well it put it into a uh something on screen and I I could just copy paste this right into something else and then manipulate it but let's say I had a really large list and that's a pain to do how do I actually get this into a file that I can work with in Excel well again there's just a little bit more to the command so press the up arrow and another pipe and we want to export Dash C and I'm just going to press tab complete on that oh so many seeds there we go CSV and C colon backslash hemp slash VPN users.csv okay now I don't think this temp folder exists let's take a quick look and see if it does it does not let's see if it creates it nope doesn't work because that folder has to exist here we go let's just run the command again Bingo and in here is a CSV file which I can open up with Notepad and there it is comma separated value now I can take this file and I can put it into something I'll have access to right now yes that was my demo station and now I can double click on that file it'll open with Excel because I have Excel on this computer and I can do some quick formatting so I can get rid of that garbage at the top insert insert insert and I can say and I also want this to be sorted because I don't like the way it is now so I will format as a table my table has headers there it is and now I can sort A to Z isn't that nice and I can change that to name Sam name and now I can present that to my client and it's going to look pretty professional hey if you found this video useful please give us a big thumbs up really helps with the Google algorithms also subscribes always appreciated and if you have any questions you can get a hold of us directly at www.urtech.ca that's www.urtech.ca or we can leave a question or comment below and if we don't get back to you somebody else will because it's YouTube and everybody has an opinion thanks and have a great day bye bye
Info
Channel: URTechDotCa
Views: 10,279
Rating: undefined out of 5
Keywords: active directory, powershell, windows powershell, active directory tutorial for beginners, active directory tutorial, active directory users and computers, export group members to csv, export group members, how to export active directory group members, how to export active directory group members list
Id: NQJUgyqpmTI
Channel Id: undefined
Length: 4min 55sec (295 seconds)
Published: Fri Aug 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.