So, I'm the new guy who doesn't have a lot of Powershell experience. I've got a rolling requirement within AD, so let me try to best desribe what I'm looking for.
I need something that can do the following:
- Pull various user groups from AD (I would have to define them by group name)
- Output each group name to it's own sheet in an Excel document
- Populate each Excel sheet with the users contained within each group
I have a something that can pull users from AD groups, and I'm able to create an Excel doc wioth differently named sheets from an existing document, but I'm not able to figure out how to get them together automatically.
I am just hoping someone already has something like this and it won't be too intensive.
If not, oh well, will just keep tinkering 'til I get it sorted.
Thanks for taking the time to read through this!
As for ...So, I'm the new guy who doesn't have a lot of Powershell experience.
This is fine. We all have to start somewhere, but this means at minimum getting some ramp up. See the below and live on YouTube, MSDN Channel 9 and do a search for 'beginning powershell' and 'Powershell using adctiive directory'.
Use any Windows tool that will write the baseline code for you (which you can then tweak), such as the Windows Server 2012 ADAC console leveraging the PowerShell History Viewer.
Active Directory Administrative Center: Getting Started 'technet.microsoft.com/.../dd560651(v=ws.10).aspx'
Active Directory Administrative Center 'docs.microsoft.com/.../active-directory-administrative-center'
Step-By-Step: Utilizing PowerShell History Viewer in Windows Server 2012 R2 'blogs.technet.microsoft.com/.../step-by-step-utilizing-powershell-history-viewer-in-windows-server-2012-r2'
MOC on-demand, if you cannot go in person.https://www.microsoftondemand.com/courses/microsoft-course-10961https://www.microsoftondemand.com/courses/microsoft-course-10962
As for ...- Pull various user groups from AD (I would have to define them by group name)
A common everyday thing. Fully documented in the built-in Help files and all over the web. See the links above.
- Output each group name to it's own sheet in an Excel document- Populate each Excel sheet with the users contained within each group
Just export to .csv using the built-in cmdlets, and open in ExcelThere are PowerShell Excel modules on the MS PowerShellGallery.com. Download and use one or the other.
Find-Module -Name '*excel*' | Format-Table -AutoSize
Version Name Repository Description ------- ---- ---------- ----------- 5.4.5 ImportExcel PSGallery PowerShell module to import/export Excel spreadsheets, without Excel.... 0.0.17 PSWriteExcel PSGallery Little project to create Excel files without Microsoft Excel being installed. 1.0.2 PSExcel PSGallery Work with Excel without installing Excel 18.0.6883.0 ExcelCmdlets PSGallery CData Cmdlets for Excel 18.0.6883.0 ExcelServicesCmdlets PSGallery CData Cmdlets for Excel Services 0.6.9 ExcelPSLib PSGallery Allow simple creation and manipulation of XLSX file 18.0.6883.0 ExcelOnlineCmdlets PSGallery CData Cmdlets for Excel Online 0.1.6 BitTitan.Runbooks.Excel PSGallery PowerShell module for Excel-related functions and resources used in BitTitan Runbooks 0.1.6 BitTitan.Runbooks.Excel.Beta PSGallery PowerShell module for Excel-related functions and resources used in BitTitan Runbooks 0.0.1 ProductivityTools.PSExcel2SQL PSGallery Module takes all excel files in given directory and push the content to database.
As for this...
You need to define this more or show your code and expected output. Yet, again, those modules should help you. Specifically the first two.
Thanks for the help! I think I got overwhelmed by the abundance of sites/assists out there and the multitude of ways to accomplish this, so having this as a starting point is incredibly helpful.
Once I think I have it I will post back here for some critiquing.
Powered by IDERA