- Home
-
Store
- Browse All
- SHARED HOSTING
- VPS SERVER
- DEDICATED SERVER
- DATABSE HOSTING
- RESELLER HOSTING
- EMAIL HOSTING
- FTP HOSTING
- Hosting Addons
- SSL Certificates
- Weebly Website Builder
- SiteLock
- Email Spam Filtering
- CodeGuard
- Windows Server License
- SSL Certificates
- Website Builder
- Website Security
- E-mail Services
- Website Backup
- SEO Tools
- Site Builder
- VPN
- Professional Email
- XOVI NOW
- Register a New Domain
- Transfer Domains to Us
- Announcements
- Knowledgebase
- Network Status
- Contact Us
-
More
Categories
Categories
Tag Cloud
Powershell Script to remove the outlook profile in the name of “outlook” Print
- 0
#Run on system logged in as the user you are trying to delete and recreate the profile for
if (test-path “$Env:USERPROFILE\outlookprofiledelete.log”){
}
else {
if(Test-Path “$Env:USERPROFILE\AppData\Local\Microsoft\Outlook”){
$PathTrue = 1
Remove-Item “$env:USERPROFILE\AppData\Local\Microsoft\Outlook\*.*” -force | Out-File $Env:USERPROFILE\outlookprofiledelete.log
}
}
if(Test-Path HKCU:\Software\Microsoft\Office\15.0\Outlook)
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Office\15.0\Outlook\AutoDiscover -Name ZeroConfigExchange -Value 1 -PropertyType DWORD -Force
Remove-Item “HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\outlook” -Recurse -Force
Remove-ItemProperty -Path HKCU:\Software\Microsoft\Office\15.0\Outlook\Setup\ -name First-Run
}
else{Write-Output ‘Outlook 2013 is not installed on this system’}
if(Test-Path HKCU:\Software\Microsoft\Office\16.0\Outlook)
{
New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover -Name ZeroConfigExchange -Value 1 -PropertyType DWORD -Force
Remove-Item “HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\outlook\*” -Recurse -Force
Remove-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Outlook\Setup\ -name First-Run
}
else{Write-Output ‘Outlook 2016 is not installed on this system’}
Was this answer helpful?
Related Articles
Powered by WHMCompleteSolution