Powershell - unable to cast object of type (Active Directory)

Hi Forum,

i build a little script to get informations from the active directory.
In my little case I ask with the mail-adresse for the personal number.

Script itself is working fine and now I need to automate it within UiPath.
When running I get the error:

But when I search for the ActiveDirectory types I canot find them in the Imports / Type Arguments.

I tried it with String & Collection of Strings aswell but no sucess so far.
Any ideas how to go with?

Thanks a lot!

Hi @Friedrich,
If string type of variable is enough for keeping the data taken from PowerShell then you can just add
| Out-String at the end of your PS script so the data return by the script will become a string type.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.