[quote quote=166951]You need to use
Select-Object -ExpandProperty SamAccountName;
select samaccountname (or more properly
Select-Object -Property SamAccountName if you use the full-form syntax) like you have there will get you the one property attached to an object, rather than just the value of the property — which is what
Set-ADUser will need.
Hi Joel, i think i do understand what you tell mee but i don’t know exaiclly what you mean. I replaced the code with
Select-Object -Property SamAccountName
But i still receive the same error message:
Cannot bind parameter Identity
Any help for me?