Answer the question
In order to leave comments, you need to log in
How to copy attribute value in ActiveDirectory?
In ActiveDirectory, you need to change the value of the User attribute to the value of the Computer attribute . For clarity of what I want:
- all AD users have some attribute someUserAttribute ;
- the value of this attribute must be assigned to the someComputerAttribute attribute of the computer on which the user is logged in.
As a result, both the user and the computer have equal values for the someUserAttribute and someComputerAttribute attributes.
How to implement this (probably in PowerShell) so that the specified actions occur when the user is authorized by the domain controller?
Answer the question
In order to leave comments, you need to log in
We simplify the life of the administrator, associate the name with the floor ...
only in the script change what to register and get someUserAttribute
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("WScript.Network")
Set objUser = GetObject("LDAP://" & objNetwork.ComputerName)
objUser.Put "someComputerAttribute", objSysInfo.UserName
objUser.SetInfo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question