Hi,
I want to get the list of users who has logged in into server within last 5 days..
i asked one of my users to log in and log out from system .. and i ran the script .. i thought i will get his entry of user logon in list .. but in results it is not appearing ..
i will share script below ..
When we run "Get-AdUser" command will its scope is related to current machine in which the command being run or is it applicable to entire active directory ..
/*
$value = get-aduser -filter -properties | Where-object {$.lastlogondate -ge (get-date).adddays(-5)}
$ulist1= $value1 | Select-object Name, LastLogonDate, SamAccountName
*/
I mean i want to get users who are logged in specific server (in my case i want to get the user list of only my terminal server) and not across all servers ..
Please help me in this to solve this problem ..
Regards,
Rohit..