-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathecsm-csua-profile-change.ps1
29 lines (25 loc) · 1.08 KB
/
ecsm-csua-profile-change.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
<#
.SYNOPSIS
PowerShell script to change the Outlook Profile address to a new domain
.DESCRIPTION
As part of a ticket for a US company, an issue was identified where the agent would authenticate with an old domain after the company had changed their primary
domain to another. The client-side feature utilises the AccountName string value in the
Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\{ProfileName}\9375CFF0413111d3B88A00104B2A6676\00000002 registry key
.NOTES
Email: [email protected]
Date: 27th September 2019
.PRODUCTS
Exclaimer Cloud - Signatures for Office 365
.REQUIREMENTS
Cloud Signature Update Agent
.HISTORY
#>
# Variables
$regkey="HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002"
$regstr="Account Name"
$olddomain="UPDATE WITH OLD DOMAIN"
$newdomain="UPDATE WITH NEW DOMAIN"
$currentaccount = (Get-ItemProperty -path $regkey).$regstr
$newaccount = $currentaccount.Replace($olddomain,$newdomain)
Set-ItemProperty -Path $regkey -Name $regstr -Value $newaccount