Hi have a really strange problem using get-qaduser.
Here is the script that I am using:
$Source = "C:\Temp\Source.txt"
Connect-QADService -Service "ActiveRolesServer" -Proxy
ForEach ($UPN in GC $Source)
Get-QADUser -identity $UPN | Select-Object -Property UserPrincipalName,MobilePhone
This is the result I am getting:
When trying the query I get nothing in return.
When running $UPN alone I get the last name in my $Source variable, which is good.
When running the script replacing the $UPN by email@example.com, all is good
But when running the query from the script the result is empty.
Also, when running it from another computer, the script is working like intended.