D
D
djalin2021-03-21 03:19:12
PowerShell
djalin, 2021-03-21 03:19:12

How to get a list of all local users?

How can I get a list of all local users from all computers in a domain? Maybe there are solutions.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew AT, 2021-03-21
@AAT666

How to List All User Accounts on a Windows System ...

A
Alexey Dmitriev, 2021-03-21
@SignFinder

Using Powershell (since local users are stored only on machines, it will collect only for machines that were turned on at the time the script was launched).
1. Create a list of all the machines you need in the domain using Get-ADComputer https://docs.microsoft.com/en-us/powershell/module...
2. In ForEach, run through all ComputerNames from the list and pull out a list of local theme users what works for you. If WinRM is enabled, then through Enter-PSSession you can go to the machines and then pull out Get-ADLocalUser, if it is not enabled, look for other options - through adsiedit, etc. ( Andrew AT gave a link to them )
3. Export the output where you need it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question