When you specify "ValueFromPipelineByPropertyName" the output property provided by the cmdlet should have the same name like your input parameter. I would recommend to specify an alias like "sAMAccountName" or "Name".

BTW: What's the difference between Identity and User? I thought that's pretty much the same?

Author

Posts

The topic ‘Cmdlet fails when using pipeline’ is closed to new replies.