Created
December 5, 2012 11:47
-
-
Save sandrinodimattia/4214953 to your computer and use it in GitHub Desktop.
Rename-Administrator.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$user = Get-WMIObject Win32_UserAccount -Filter "Name='Administrator'" | |
$username = -join ([Char[]]'abcdefghijklmnopqrstuvwxyz._-~´`àéèç' | Get-Random -count 15) | |
$user.Rename($username) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment