We have been running a policy script to create new users for ever :).
The business wants to create random computer names for pre-created computer objects, easy enough in in PowerShell with a uniqueness check.
However using a onprecreate event handler, we get a system violation stating the property is owned by system when we attempt to set the CN. "encountered an error when creating the object 'cn=L538784,OU=Laptop,OU=Quest Test Objects,DC=corp,DC=test,DC=com'. The attribute cannot be modified because it is owned by the system. (Exception from HRESULT: 0x800720B1)"
Ideally I would like the policy would pre populate the computer name when the agent selects new computer of selected OU's.
the original user object script had a policy marker, function onGetPolicyMarker=EDS_APE_TYPE_UNIQUE_NAME
Is there an equivalent for PowerShell and computer objects ?
Thanks,