Here’s a quick one liner script to remove non-Administrator(s) from the administrator group
Get-LocalGroupMember Administrators | where name -NotLike *Administrator* | Remove-LocalGroupMember administrators
Here’s a quick one liner script to remove non-Administrator(s) from the administrator group
Get-LocalGroupMember Administrators | where name -NotLike *Administrator* | Remove-LocalGroupMember administrators
Leave a Reply