With

 Code:
$objComputer = GetObject("WinNT://"+@WKSTA)
$objComputer.Filter = "User",""
For Each $objUser in $objComputer
  ? 'User: '+$objUser.Name
Next


I get a list of local users.
How can I delete a specific local user if found in this list?

I tried
 Code:
$objComputer = GetObject("WinNT://"+@WKSTA)
$objComputer.Filter = "User",""
For Each $objUser in $objComputer
  if $objUser.Name = "<unwanted_user>"
    ? "Unwanted User detected, trying to delete..."
    $objUser.Delete "User","<unwanted_user>"
  EndIf
Next


But that did not work.

Any ideas?

Kindest regards,
Christian...