I've performed an import of our students into Live@Edu following successful use by staff since January. Besides the standard account details each student account has CustomAttribute1 and CustomAttribute2. CustomAttribute1 holds the value "student" and CustomAttribute2 holds the value of the year groups enrollment.

I've since realised there is an error in the year 9 csv file I was sent but due to there being a million and one things to do at the time I didn't notice.

Can anyone help with the a Powershell command to delete all accounts which have a certain value in the CustomAttribute2 field?