Posted On July 23, 2019

Outlook: How to Reset & Rebuild Profile

kimconnect 0 comments
blog.KimConnect.com >> Windows >> Outlook: How to Reset & Rebuild Profile
Remove Existing Profile

Run: control.exe > click on Mail

Click on Show Profiles

Click on Remove > Yes > OK

Purge Local Outlook Folder of all previous files
# Purge Outlook Profile Folder

$outlookItems=(get-childitem -Recurse -Attributes !Directory "$env:localappdata\Microsoft\Outlook" -force).FullName;
$handles = handle;
if (!(handles)){

}
# Requires handle.exe from Systernals. returns pid
function findPidLockedFile{
param($lockedFile)
$scrollingPid="";
$lockingPids=@();
foreach ($line in $handles) {
if ($line -like "*pid:*") {$scrollingPid=$line}
if ($line -like "*$lockedFile*") {
#[void]($scrollingPid -match "(.*)\spid:");
[void]($scrollingPid -match "pid:\s(.*)\s");
$lockingPids+=,$matches[1];}
}
return $lockingPids|get-unique
}


foreach ($x in $outlookItems){
try{
Remove-Item $x -Force
}
catch{
$lockingPids=findPidLockedFile $x;
$lockingPids|%{stop-process -id $_ -force};
Remove-Item $x -Force
}
}
Trigger Outlook and re-create profile

a. Start Outlook in Safe Mode

Start > Run > Outlook.exe /safe > wait for Outlook to load > close Outlook > wait 1 minute for system memory of the application to clear

b. Start Outlook as normal

Start > Run > Outlook.exe > Follow wizard to create new profile

What Problems Does this Solve?
  1. This one (after the “phantom” DNS record of mail.domain.com has been removed):
  2. And this one…


  3. Freezing or crashing Outlook cases that are isolated to certain lucky users.

Leave a Reply

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

Related Post

Some Common SysAdmin Tools

LAN Speed Test: https://totusoft.com/lanspeedPutty: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.htmlCutePDF: http://www.cutepdf.com/Products/CutePDF/writer.aspRemote Desktop Manager: WAN IP: https://ipchicken.com/Chrome: https://www.google.com/chrome/Firefox: https://www.mozilla.org/en-US/firefox/download/thanks/?scene=2#download-fxFlash: Java: TextPad:…

How to Install RSA Radius Server

Configure firewall to NAT these ports for RSA:22 TCP49 TCP80 TCP161 UDP443 TCP1645 UDP1646 UDP1812…

PowerShell: Deploy Certs on Remote Windows Servers

Quick Script for Local Machines: $certPath="C:\kimconnect_cert.pfx" $certPlaintextPassword='PASSWORD' $certEncryptedPassword=ConvertTo-SecureString $certPlaintextPassword -AsPlainText -Force Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\My -FilePath…