The code for Microsoft.PowerShell_profile.ps1 is: # Run powershell as Administrator and enter the command 'set-executionpolicy Bypass' to allow local scrips to run. # Configure PS for Admin or normal account. #$env:Voice = "No" # Turn off voice. $currentPrincipal = New-Object Security.Principal.WindowsPrincipal( [Security.Principal.WindowsIdentity]::GetCurrent() ) & { if( [IntPtr]::size * 8 -eq 64 ) { $title = "Windows PowerShell (x64)" } else { $title = "Windows PowerShell (x86)" } if ($currentPrincipal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator )) { if ( $env:Voice -ne 'No' ) { # run 'set Voice=No' before running powershell to stop the voice output. Add-Type -AssemblyName System.Speech $voice = New-Object System.Speech.Synthesis.SpeechSynthesizer $voice.Speak("Oh, my god, its,") $voice.Speak("its,") } (Get-Host).UI.RawUI.Backgroundcolor="DarkMagenta" # Set the background color to dark red. Clear-Host # clear the screen to show in background color. Write-Host "`nWarning: PowerShell is running as" $env:Username" elevated to Administrator!`n" # Display a warning message. $title += " as Administrator" if ( $env:Voice -ne 'No' ) { $voice.Speak("its an admin") } } else { (Get-Host).UI.RawUI.Backgroundcolor="DarkMagenta" # Set the background color to dark magenta (which is a dark blue - stupid windows). #Clear-Host # clear the screen. Write-Host "`nPowerShell is running as" $env:Username".`n" # Display a welcome message. } $host.UI.RawUI.WindowTitle = $title } $currentPrincipal = $null # Remove the $currentPrincipal variable. #$Transcript = "$env:USERPROFILE\Documents\WindowsPowerShell\Transcripts\PowerShell_transcript".$date.".txt" #$test = $test.ToString() #$Transcript = $test function x{ exit; } $psdir="$env:USERPROFILE\Documents\WindowsPowerShell\Scripts\autoload" if (Test-Path -Path $psdir) { # Load all scripts in the 'autoload' directory. Write-Host "Running autoload scripts." Get-ChildItem "${psdir}\*.ps1" | %{ Write-Host "Running script: $_"; .$_ } } else { Write-Host "There are no autoload scripts to run." Write-Host "$psdir doesn't exist." } Write-Host "" cd "$env:USERPROFILE\Documents\WindowsPowerShell\Scripts" #Write-Host "This script written by Jim Martinson.`n"