Hi All,
We had a requirement to find out the users, who are created but never logged on to any machines. Such users we need to disabled
I have tried the below command, but it didn't work. Also i tried to configure the below command via scheduled task, gaves an error.
Request you to please help me in correcting the commands and for configuring the scheduled task.
Search-ADAccount-AccountInactive-TimeSpan([timespan]10d)-UsersOnly|Set-ADUser-Enabled $false -WhatIf
Thanks HA