Using Powershell to identify legacy security groups


hello,

i've begun using powershell commands query active directory, i'm looking old security groups i can remove. 

this command gives me listing of security groups in ad:

get-adgroup -filter {groupcategory -eq "security"}

i'd modify command give me list of groups created before date.  know information tracked because if open properties of security group in ad can see follow 2 fields applicable:

whenchanged
whencreated

does know how output of security groups create prior december 1st 2005?

  get-adgroup -filter {groupcategory -eq "security"} -properties whencreated | ? {$_.whencreated -le $(get-date '1.1.2005')}  


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group