I am trying to delete local user account using `System.DirectoryServices.AccountManagement.UserPrincipal`

I am using VS 2010 running on Windows Server 2008 R2 Enterprise SP1

Here is my code

```
using (var ctx = new PrincipalContext(ContextType.Machine))
{
    using (var up = UserPrincipal.FindByIdentity(ctx, "test1"))
    {                        
        if (up != null)
        {
            up.Delete();
        }
    }                       
}

```

When `up.Delete()` is called, I receive the exception with the following message:

> 
> The Active Directory object located at the path
>  WinNT://DOMAIN/MACHINENAME is not a container.
> 
> 
> 

What should I do to make `Delete()` work?