Rockstar101
MIS
Hello, I'm trying to learn powershell -
I am trying to pull a list of users who were last modifed in the last few days which belong to a specific group and only users that reside in a specific OU.
I can pull the users in the OU and belong to the group but HOW can I do it based on 'object modified' date?
This is what I have:
THANKS - ANY HELP IS VERY APPRECIATED.
*************************
#Target Domain and OU where the Users are located
$OU = "OU=A,OU=Users,OU=Managed Objects,DC=corp,DC=bell,DC=net"
#Target the group location and search for Users BELONGING to the group that only reside in the above OU and write to file.
$User = Get-QADUser -SearchRoot $OU -MemberOf "CN=SSL Citrix,OU=VPN,OU=Users,OU=Managed Objects,DC=corp,DC=bell,DC=net"
get-childitem | foreach-object {$User.lastwritetime -gt "07/24/2010"} | out-file c:\SSL_Citrix_User.txt
***********
THANKS - ANY HELP IS VERY APPRECIATED.
I am trying to pull a list of users who were last modifed in the last few days which belong to a specific group and only users that reside in a specific OU.
I can pull the users in the OU and belong to the group but HOW can I do it based on 'object modified' date?
This is what I have:
THANKS - ANY HELP IS VERY APPRECIATED.
*************************
#Target Domain and OU where the Users are located
$OU = "OU=A,OU=Users,OU=Managed Objects,DC=corp,DC=bell,DC=net"
#Target the group location and search for Users BELONGING to the group that only reside in the above OU and write to file.
$User = Get-QADUser -SearchRoot $OU -MemberOf "CN=SSL Citrix,OU=VPN,OU=Users,OU=Managed Objects,DC=corp,DC=bell,DC=net"
get-childitem | foreach-object {$User.lastwritetime -gt "07/24/2010"} | out-file c:\SSL_Citrix_User.txt
***********
THANKS - ANY HELP IS VERY APPRECIATED.