Paste the code from this blog into your profile:
& { $wid=[System.Security.Principal.WindowsIdentity]::GetCurrent() $prp=new-object System.Security.Principal.WindowsPrincipal($wid) $adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator $IsAdmin=$prp.IsInRole($adm) if ($IsAdmin) { (get-host).UI.RawUI.Backgroundcolor="DarkRed" clear-host } }
If you are running all users as standard users (which you should really be doing, see why here), there is no need to use this script. Simply put the following code into the Administrator profile:
(get-host).UI.RawUI.Backgroundcolor="DarkRed" clear-host
0 comments:
Post a Comment