Describe the bug
The delete method invocation used by this function doesn't work in the greater majority of environments.
Expected behavior
This function should work where PowerShell 5+ is installed and remove local accounts when run if those domain accounts are disabled.
Error Message
If applicable, add error messages to help explain your problem.
Additional context
Consider alternative methods to handle this process. Perhaps use Try/catch or if/else to invoke different methods dependents on the environment.
Environment
Describe the bug The delete method invocation used by this function doesn't work in the greater majority of environments.
Expected behavior This function should work where PowerShell 5+ is installed and remove local accounts when run if those domain accounts are disabled.
Error Message If applicable, add error messages to help explain your problem.
Additional context Consider alternative methods to handle this process. Perhaps use Try/catch or if/else to invoke different methods dependents on the environment.