Powershell Script and virtual attributes

Hello all,

In a PowerShell Script, I use "$NewStreet = $DirObj.Get("street")" and it work fine.

But if i use the same commande with a Virtual Attributes it's doesn't work:

$Location = $DirObj.Get("CompanieLocation") 

How can I use Virtual Attributes in PowerShell Script?

Thanks ;)

Gégé

Parents Reply
  • I have also had success for Virtual Attributes using $DirObj.GetInfoEx. This loads the values of specified properties of the object from the directory store into the ADSI object's property cache.

    Example:

    # Load the virtual attributes from the existing AD object into cache
    [void]($DirObj.GetInfoEx(@('edsvaAzureObjectID'),0))

    $AZID = $DirObj.Get("edsvaAzureObjectID")

Children
No Data