This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What can avoid Set-QADUser to populate a virtual attribute ?

Hi to all,

In ARS I created a virtual attribute of syntax 'directory string', which I can populate through interface for every user with no problem.

Now comes the PowerShell part:

I can read from this value from any given user, but I cannot write a value, in there. No error, nothing, but value is not set: it just keeps what was in there before.

Here is the -very basic- code I use, which doesn't work:

        Set-QADUser $AccountSam -ObjectAttributes @{edsvaMyVirtualAttribute = $Value}

 

This is working with some other previously created virtual attributes, but not with the ones I create, now.

 

Now comes my question: what do I miss, what can make these virtual attributes not able to be populated through ARS shell cmdlets??

 

Thanks in advance for any idea :)

 

  • points to check:
    #1. you can access and update the VA via AR.MMC, AR WI (VA is "Stored" in AR db)
    #2. Set-QADUser -Service -Proxy - flags might be needed if running script not on AR Server.
    #3. Get-QADUser -Service -Proxy -can you read the VA?

  • The '-Proxy' switch above is the key to modifying virtual attributes. This tells the cmdlet to perform the request through your AR server. This assumes that you have rights through AR delegation (or because you are an AR administrator) to perform this modification.

    It's also worth noting that when you want to enumerate the contents of the attributes later that you must explicitly reference them with the '-IncludedProperties' switch as they will not be returned by a default "Get-QADUser -Proxy -identity $MyUser" request.
  • Thanks Aidar,
    I actually tried it with the "-Proxy" flag, and also using the "-Connection" one with its proper value, but it's not the issue here :(
    As stated, this code works with some other VA, and not latest ones I create...

    To answer your questions:
    #1: Yes, Read and Write is OK via both MMC and WI
    #2: see above, but writing into VA is not possible even with the correct parameter
    #3: yes, reading is not a problem, I can retrieve the value fine through Get-QADUser cmdlet.

    Thanks for your help :)
  • Thanks Johnny, good explanation.
    Unfortunately, I already tried with the -Proxy parameter, and result was the same...
  • Hi Sebastian,

    Try placing the attribute name between single quotes like the following:

    Set-QADUser $AccountSam -ObjectAttributes @{'edsvaMyVirtualAttribute' = $Value} -Proxy

    It should only be necessary if the attribute name has spaces or other certain characters but it's worth a shot.

  • Good tip, but I unfortunately already tried (and I just re-tried), with no luck :(
    Thanks nevertheless :)
  • Is it possible that you have multiple Active Roles Administration Services and you may be connecting to one service that hasn't been restarted since creating the new virtual attribute?
  • No, actually, that was my first assumption, too. So I restarted all Admin services servers we have, but it didn't change anything...
  • What if anything shows up in the event logs of your AR servers when you attempt this command? (I'm wondering if it is even getting there).
  • Hi ,
    would like to know ,how the values are called. i mean the source csv, txt or excel
    if ur using the excel and the column name is Value

    Set-QADUser -ObjectAttributes @{'edsvaMyVirtualAttribute'=$_.Value}