AhmedAliShaik
asked on
Report of Users accounts in Domain Controller created in Last 5 days.
Hi All,
As per requirement i have to pull a report of users accounts who has been created in last 5 days. All Domain controller are running in 2008 server.
Please share me powershell command to meet my requirement.
As per requirement i have to pull a report of users accounts who has been created in last 5 days. All Domain controller are running in 2008 server.
Please share me powershell command to meet my requirement.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Mike thanks for your response.
We are not allowed to run any tool except Microsoft in our production.
Please suggest me with the powershell or any microsoft cmdlet.
Thanks .
We are not allowed to run any tool except Microsoft in our production.
Please suggest me with the powershell or any microsoft cmdlet.
Thanks .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Thinkpad,
Good to know the easy step too. As per our requirement if we have a script we can automate and run a batch file, trigger an email to customer.
I have used the Quest command given by Sarang & powershell given by others aswell which are working fine.
I completely agree with your method wen we need few thinks instantly & when we are not sure about the code.
Thanks a lot.
Good to know the easy step too. As per our requirement if we have a script we can automate and run a batch file, trigger an email to customer.
I have used the Quest command given by Sarang & powershell given by others aswell which are working fine.
I completely agree with your method wen we need few thinks instantly & when we are not sure about the code.
Thanks a lot.
ASKER
Thanks All.
ASKER
$date=(Get-Date).adddays(-
Get-ADUser -Filter {whencreated -gt $date} -properties * | ft name,whencreated
I am getting the output in the below format:
name whencreated
a date time
Can i get the output in the below format:
Name whencreated noofdays
A date time 2
In the no. of days i want the substraction & know how many days back the account is created . In the output it shouls be (1 to 5)