Indie101
asked on
Script for last modification date for AD accounts
Looking for a powershell script that satisifies getting
Last modification date for AD accounts in an organistation
Want to use it to check AD accounts that haven't been modified in over a year
Have used lastlogon and lastlogontimestamp but looking for modification
Last modification date for AD accounts in an organistation
Want to use it to check AD accounts that haven't been modified in over a year
Have used lastlogon and lastlogontimestamp but looking for modification
ASKER
Thanks for that get the below error
get-aduser : The input object cannot be bound to any parameters for the command either because the command does not
take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:36
+ $date = (Get-Date).AddDays(-365) | get-aduser -Filter {modifyTimeStamp -lt $date ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (16/11/2017 14:22:14:DateTime) [Get-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Micros oft.Active Directory. Management .Commands. GetADUser
get-aduser : The input object cannot be bound to any parameters for the command either because the command does not
take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:36
+ $date = (Get-Date).AddDays(-365) | get-aduser -Filter {modifyTimeStamp -lt $date ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (16/11/2017 14:22:14:DateTime) [Get-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,Micros
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sure point take taken :) I couldnt fit the lines in originally
Thanks
Thanks
ASKER
Thanks very much that did the job really well :)
Open in new window