Difference between revisions of "PoshTokenBloat"

From WikiWiki
Jump to navigation Jump to search
(Created page with "http://blogs.msdn.com/b/adpowershell/archive/2009/09/05/token-bloat-troubleshooting-by-analyzing-group-nesting-in-ad.aspx <syntaxhighlight lang="powershell"> function Get-G...")   (change visibility)
 
Line 4: Line 4:
  
 
<syntaxhighlight lang="powershell">
 
<syntaxhighlight lang="powershell">
 +
 
function Get-GroupNesting ([string] $identity, [int] $level, [hashtable] $groupsVisitedBeforeThisOne, [bool] $lastGroupOfTheLevel)
 
function Get-GroupNesting ([string] $identity, [int] $level, [hashtable] $groupsVisitedBeforeThisOne, [bool] $lastGroupOfTheLevel)
 
{
 
{
Line 97: Line 98:
 
}
 
}
  
 
 
#http://blogs.msdn.com/b/adpowershell/archive/2009/09/05/token-bloat-troubleshooting-by-analyzing-group-nesting-in-ad.aspx
 
#1. PS GC:\> Get-ADGroupNesting.ps1 CarAnnounce
 
#
 
#2. PS GC:\> Get-ADGroupNesting.ps1 CarAnnounce –ShowTree
 
#
 
#3. PS GC:\> Get-ADPrincipalGroupMembership "de swaef.l" | % {Get-ADGroupNestingTOP $_} | FT Name,GroupCategory,NestedGroupMembershipCount,MaxNestingLevel –A
 
#
 
#4. PS GC:\> Get-ADPrincipalGroupMembership "deswaef.l" | Where {$_.GroupCategory -eq "Security"} | % {Get-ADGroupNestingTOP $_ -ShowTree | FT Name,GroupCategory,NestedGroupMembershipCount,MaxNestingLevel -A}
 
#
 
#5. PS GC:\> (Get-ADUser DonFu -Properties MemberOf).MemberOf | % {Get-ADGroupNesting.ps1 $_ -ShowTree} | FL DistinguishedName,NestedGroupMembershipCount,MaxNestingLevel
 
  
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 11:31, 19 January 2016