Disable the Windows “Shake” feature

Shaking the mouse while dragging another window’s title bar minimizes all other Windows. The UI to disable this “feature” is no longer obvious and I was able to disable it by making the following registry change. Note: This worked even on a gpo machine since it only modified CURRENT_USER.

registry location

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Add the following DWORD key with value 1

DisallowShaking 

Get user credentials securely in PowerShell

#Get user credentials securely
Try {
	$credentials = Get-Credential "$env:username"
}
Catch {
	$log += "`n- " + $_.Exception.Message
	Output-Result
}

#Get current domain to use for authentication. ADSI = Active Directory
$currentDomain = "LDAP://" + ([ADSI]"").distinguishedName

#Authenticate
$activeDirectoryEntry = New-Object System.DirectoryServices.DirectoryEntry($currentDomain,$credentials.GetNetworkCredential().UserName,$credentials.GetNetworkCredential().Password)
if ($activeDirectoryEntry.name -eq $null)
{
    $log += "`n- Failed to authenticate that username and password."
    Output-Result	
} else {
    $log += "`n- Authentication was successful."
}

#Display Results
$log = "Results:"
function Output-Result {
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") > null
    $oReturn=[System.Windows.Forms.Messagebox]::Show($log)
    Break
}