Hi
I've added values to two attributes of an Oraganization Unit:
adm-CustomAttributeText1
adm-CustomAttributeText2
I'm trying to extract these properties with a powershell script (this is to update the users email address based on a parent OU i a managed domain):
Import-Module Adaxes
$username = "user@domain.com"
$password = "password"
$domain = "domain.com"
$passwordSecure = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($username, $passwordSecure)
$User="CN=%fullname%,OU=Users,OU=%extensionAttribute1%,DC=domain,DC=com"
$email=Get-AdmObject -Credential $credential -Server $domain -Identity 'OU=%extensionAttribute1%,DC=domain,DC=com' | FL adm-CustomAttributeText1
Set-AdmUser -Identity $User -Credential $credential -EmailAddress %firstname%.%lastname%@$email -Server $domain
But this does not provide the value set in adm-CustomAttributeText1.
Any ideas?