Need Help deleting all local user account through powershell

by Mar 24, 2018

Hello,

I am trying to delete all local user accounts on machine through Get-wmiobject but getting error as below.

First: I retrieve all users with account type code — 512 means local account and stored in avariable.

Second: After this I put say $a | remove-wmiobject.

Error:  This provider is not capable of doing this operation.