The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match
any of the parameters that take pipeline input.
CategoryInfo : InvalidArgument:
AND
Same Result of following command, No Sorting
$TamGroup = Get-AdgroupMember -identity ITDept -Recursive
foreach ($member in $TamGroup) { get-aduser $member.samaccountname -properties displayname, title, Department, Office | Sort-Object -Property Title, Name | select displayname, title, Department, Office }
If you want to sort by multiple properties, you have to pass those properties to Sort-Object cmdlet. Both of the above approaches Sort only with name not with title. Please check our previous replies.