Hi all, i have another problem.
$listaaccounts = import-csv “E:\appoggio\Scripts\Export attributo\Listaaccountstest.txt”
foreach($account in $listaaccounts)
{ Get-ADUser -identity $account.accounts -properties otherMobile,name | select otherMobile,name }
Produce this output:
otherMobile name
{+393474174923} Atzei, Antonello (Portovesme - IT)
{+393485735339} Annalisa Atzeni
And this is ok.
But if i try to export the output in a .txt file :
$listaaccounts = import-csv “E:\appoggio\Scripts\Export attributo\Listaaccountstest.txt”
foreach($account in $listaaccounts)
{Get-ADUser -identity $account.accounts -properties otherMobile,name | select otherMobile,name | select otherMobile,name | export-csv “E:\appoggio\Scripts\Export attributo\Exportcels.txt” -append
The output on the .txt file is this:
"otherMobile","name"
"Microsoft.ActiveDirectory.Management.ADPropertyValueCollection","Atzei, Antonello (Portovesme - IT)"
"Microsoft.ActiveDirectory.Management.ADPropertyValueCollection","Annalisa Atzeni".
The question is: why i get "Microsoft.ActiveDirectory.Management.ADPropertyValueCollection" in the output file ?
thankyou.