• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

TECHDIIP

  • Tech
  • Windows
  • Powershell
  • Scripts
  • News
  • Games

Get AD User Group Membership Reports

Get AD User Group Membership Reports using Powershell script, here in this article we explain how you can run a simple script and get the desired report on the windows operating system.

IT administrators often work on auditing for compliance, when you want to pull a user account Active Directory group membership with Powershell then here is the simple code that generates the CSV output.

Get-ADPrincipalGroupMembership John | select name, groupcategory, groupscope 
| export-CSV C:\temp\Adgroupmembership.csv

In the above examples script, I put the user name as John you can change that name and use it accordingly.

Get-ADPrincipalGroupMembership Parameters

[-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Identity] <ADPrincipal>
[-Partition <String>] [-ResourceContextPartition <String>] [-ResourceContextServer <String>][-Server <String>][<CommonParameters>]

Thank you for reading this article, if you have any questions please let us know.

Thank you for visiting my site, for any scripts in these articles you are testing please make sure you have tested this script in our lower environment before you run in production.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Fixed : Page fault in nonpaged area 2022
  • Solved: Ethernet doesn’t have a valid IP configuration 2022
  • 5 Best Free Youtube Video to MP3 Converters in 2022
  • Fixed : Audio renderer error 2022
  • Fixed: Discord search not working 2022
  • About Us
  • CONTACT US
  • Disclaimer
  • Privacy Policy

Copyright © 2022 techdiip.com