
It almost seems like as if the mfcmapi is completely broken. I also tried a little bit of the mfcmapi app from here: īut I got sooooo many errors just following the documentation from microsoft and researching the random errors didn't really get me far. This is able to bring up the prompts for the email setup but is there anyway to include that in this powershell script? ::Show("Nothing was done", "Information", 'OK', 'Information') Start-Process 'C:\Program Files (x86)\Microsoft Office\root\Office16\outlook.exe' | Out-Null Remove-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Outlook\Setup\ -name First-Run | Out-Null Remove-Item "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\*" -Recurse -Force | Out-Null #New-ItemProperty -Path HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover -Name ZeroConfigExchange -Value 1 -PropertyType DWORD -Force


If (Test-Path HKCU:\Software\Microsoft\Office\16.0\Outlook) ::Show("A file was still in use, try again.", "Information", 'OK', 'Error') $void = Remove-Item "$Env:appdata\Microsoft\Outlook\" -force -recurse | Out-Null If (Test-Path "$Env:appdata\Microsoft\Outlook\") Get-Process outlook | Stop-Process | Out-Null $Drafts = $namespace.GetDefaultFolder(::olFolderDrafts) $outbox = $namespace.GetDefaultFolder(::olFolderOutbox) $namespace = $outlook.GetNameSpace('MAPI') $Outlook = New-Object -comobject Outlook.Application Do you want to continue?", "Continue?", 'YesNo', 'Question')Īdd-Type -assembly "" Tried using this powershell script I found from here: $continue = ::Show("This will delete any outlook profile on your machine. (I don't have enough rep points for pictures so here are links to my pictures) This used to be in the older versions from what my research says but its not there anymore: Tried using O365 configuration tool to make a customized version of office apps that include the email profile - failed - apparently they took this feature out of the newer O365 configuration tool. Tried using PowerMapi's New-MapiProfile - failed - found out from here: that this will not work on office 2016 or office 365 as they change the credential setup Trying the ZeroConfigExchange anyway - failed - It doesn't know where the smtp information is to create the profile. So I have been try very hard to find any method to automatically create an outlook profile based on email address, server address, and credentials so that when the user first gets there device, it will add the outlook profile to there account. The users are using Azure AD to connect to computers but there Azure AD has no clue what the smtp address is for the user because they don't have exchange online with microsoft but rather, they have exchange online with intermedia/serverdata.

This specific difference makes it very hard to setup outlook profiles automatically using ZeroConfigExchange based on autodiscover and the smtp address of the AD user. Each client uses Office E3 licenses for office apps but they use a third party company for there email hosting (intermedia/serverdata). I work for a MSP that has about 70 clients. No setup or configuration for the end user. They should just click on Outlook and there email show up first time. What is the goal - Automatically program outlook profiles without client/user intervention.
