Greetings,<\/p>\n
I’m looking for a powershell script to move computer objects in AD into the same OU as the user account after which they are named.<\/p>\n
More info: Users and their laptop are named with a number. For instance, userA is 34567. The computer they use is also named (via FOG registration) 34567. However, during the creation process in AD, the computers were moved into a central OU… “SWorkstations”<\/p>\n
Ideally, I’d like to write a powershell which says UserA is in ou OrgUnit4. Move the matching Computer Object name into the OrgUnit4 OU.<\/p>\n
thanks for any assistance you can provide.<\/p>","upvoteCount":6,"answerCount":12,"datePublished":"2021-12-02T20:14:09.000Z","author":{"@type":"Person","name":"shepherd","url":"https://community.spiceworks.com/u/shepherd"},"acceptedAnswer":{"@type":"Answer","text":"