Syntax

clear
if($process=(get-process ‘outlook’ -ErrorAction SilentlyContinue))
{
Write-Host “Outlook is running so close it..” -ForegroundColor Green
kill($process)
Write-Host “Outlook is stopped ” -ForegroundColor Green
}

$reg=”HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles”
$child=(Get-ChildItem -Path $reg).name
foreach($item in $child)
{

Download Full Script

Purpose:This script automates the process of profile creation in Outlook
Modification:When prompted, the user only needs to enter his/her e-mail address and their profile will be configured immediately to it
Type:PowerShell Script (ps1)
Compatibility:Windows
Tags:Outlook
Reference link:

https://superuser.com/questions/1141519/configuring-outlook-with-powershell