Generic admin id checker windows

Can someone help me with powershell script to check a genric admin id has logon access on which all machines.

I just need to give input a generic admin id(eg admin\abcd) and it returns all the workstations/servers/machines on which it has access.

This feature we can check from MMC snap-in and searching that id and going to properties–>log on. This gives all the machines.

But I am looking for some alternative to check directly from my powershell console and later I can add the script to my tool.

Hi Akshat,

Please share the PowerShell script you already have or any attempt. If you don’t have anything, please invest the time to Google/Bing for PowerShell scripts which are solving the same or a similar problem. Try them out, post your attempt here and ask specific questions for us to help you. We don’t have the time and resources to script something up for you from scratch from some vague requirements.

Thanks for your understanding and please continue to post your questions.


Get-ADUser ‘userName’ -Properties logonworkstations

I used such kind of script but tne problem is i cant get entrie directory results.

it throws an error evertime and says can not find an object with identity ADMIN/comprise under dc=prod, DC=travp, DC=net

This is because this genric id was created in admin domain…how to get these results…

Using mmc snap in, i need to search in entire directory then I get this instead of