Also, how do I get an OU member in PowerShell?
Simply open the “User Accounts” report, specify the path to the OU you're interested in and run the report. You'll get a list of the members of that OU with the following user account properties: name, logon name and status.
Subsequently, question is, how do you get a distinguished OU name? How to find the distinguishedName of an OU
- Navigate and right-click the OU where you want to read users, then select Properties.
- In the OU Properties, select the Attribute Editor tab. Click on distinguishedName to highlight it, then click View. Right-click the highlighted value and select Copy.
- Example: OU=Users,OU=Company_1OU,DC=Company_1,DC=internal.
Regarding this, how do you change OU in PowerShell?
PowerShell: Move Computer to OU
- Expand the domain root and select the Computers container;
- Find the computer name you want to move, right-click on it, and select Move;
- Select the OU to which you want to move this computer. For example, we want to move it to USA > Florida > Computers, and click Ok;
How do you check which OU a user belongs to?
- Right-click the user, and select Properties.
- Click the "Object" tab.
- The OU path is shown in the "Canonical Name of object" field.