Having a little bit of a drama geting this to work exactly the way I want. I need to filter the output of a query being run against an Exchange Server, to only come back with stats for users with a surname of "smith" for example. I plan to actually run this against other attributes later, but for the sake of this article, lets use the sn (or as EMS has it "LastName").
Thanks for that, works perfectly.