Simple Powershell To Remove 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

Your email address will not be published. Required fields are marked *