CameronFrasnelly
asked on
AD script to change PC name based on GUID in Active Directory
In Active Directory you can assign a PC a GUID when you create it's account. We are wanting to write a script that looks up the computer name based on this GUID. We want to do this in case we image a bunch of machines we can run this script to 1) connect to AD 2) lookup the GUID based on the local PC 3) look at the pc name associated with the GUID 4) change the name of the local PC 5) join the pc back to the domain.
Any thoughts would be appreciated!
Any thoughts would be appreciated!
ASKER
: ) We want to lookup the PC name based on the netbootGUID in AD. So first we'll retrieve the local UUID (which we will have prestaged as the netbootGUID in AD) then we'll lookup the computer in AD that has the same GUID set for it's netboodGUID and grab the computer name. At that point we'll rename the pc and join the domain and life will be good! : )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you talking about prestaging a RIS computer?
If you image a bunch of PCs then the GUID will only show up in AD if you pre-stage the computers, in which case you'll be setting the name of the local PC and joining the domain anyway...so I'm not sure what you are asking, unless you are wanting something that does the "prestaging" automatically.