Get Users properties from AD based on RDPersonalVirtualDesktopAssignment RRS feed

  • Question

  • Hello everyone. Thinking of getting User info (It Name, Office & all other fields from AD), based on their RD desktop assignment from VDI. The problem is cmdlet

    Get-RDPersonalVirtualDesktopAssignment | select user

    return user in format DOMAIN\sAMAccountname, but Get-ADUSER input requires only sAMAccountname. I'm thinking how to delete prefix DOMAIN from variable, which content user & VirtualDesktopName. For now i'm doint this manually, exporting Get-RDPersonalVirtualDesktopAssignment user & VM name to XML, deleting domain and them importing to pipeline to cmdlet "get-aduser". Can i automate this?

    I mean write in variable user and their vm, delete domain name from user and then pipeline it to get-aduser.

    Wednesday, April 16, 2014 2:06 PM


  • Get-RDPersonalVirtualDesktopAssignment |%{$_.Name.Split('\')[1]}


    • Marked as answer by Kerberrus Thursday, April 17, 2014 9:27 AM
    Wednesday, April 16, 2014 2:13 PM