Run a Script Rule: Send a New Message when a Message Arrives

Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#1
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#3
No, and i don't think PowerShell can create a profile - it can delete a profile, but not an account from within the profile AFAIK.

if its a business version, the office deployment tool can be a help...


This powershell would delete all profiles and clean out the folder where outlook stores data files. Save it in notepad with the extension ps1 and run in PowerShell - it requests permission to delete the registry key - i can't get -force to work.
Code:
$User = [Environment]::UserName
$path = "C:\Users\" + $User + "\AppData\Local\Microsoft\Outlook\"
del $Path -force -Recurse
New-Item -Path $path -type directory

$Reg = "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\"
Get-ChildItem "Registry::$Reg" |
ForEach-Object {Remove-Item -Path "Registry::$reg" }
new-item 'HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\'
 

Similar threads

Top