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

Quest ActiveRoles script logic

Hello, first time poster, but this is really confusing me.

I have a very basic script but my logic is wrong because I’m not getting the results I need.

 

Background info, I have a csv containing a list of email addresses like a@aol.com, b@aol.com, c@aol.com

Here’s the script

 

Add-PSSnapin Quest.ActiveRoles.ADManagement

Get-Content C:\WhateverTempFile.csv |

Foreach{

Get-QADUser -SizeLimit 9999 -proxyaddress "*$_*" |

Select-Object $_, SamAccountName, givenName, Lastname}|  Export-Csv C:\Results.csv

 

The results look like this

 

"a@aol.com","SamAccountName","givenName","LastName"

,"a","Andy","Fake"

,"b","Brandy","Fake"

,"c","Candy","Fake"

 

The problem is, I want the email address for each user, but it seems to be querying ADUC for an attribute called a@aol.com (which isn’t finding anything… so the results are null for all users)

How do I get that original value to display for each user?