Forum Discussion
Say_Much
Oct 08, 2019Copper Contributor
Skype Add-In gets disabled when switching multiple accounts(guest) between MS Teams
Hi, When I'm switching Teams current account to guest account then below changes happening and skype addin gets disabled , sometimes both skype and teams addin disabled from outlook. HKEY_CUR...
Jens_St
Jul 11, 2022Copper Contributor
Hi Say_Much
Running this PowerShell script will add an access rule to DENY the current user the right to SetValue on this registry key. Then Teams (running in current user's context) won't be able to change the value anymore and the Outlook-plugin stays enabled. ![]()
$regPath = 'Registry::HKCU\Software\Microsoft\Office\Outlook\Addins\UCAddin.LyncAddin.1'
Set-ItemProperty $regPath -Name LoadBehavior -Value 3
$acl = Get-Acl $regPath
$acl.Access | FT *
$idRef = [System.Security.Principal.NTAccount]([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)
$regRights = [System.Security.AccessControl.RegistryRights]::SetValue
$inhFlags = [System.Security.AccessControl.InheritanceFlags]::None
$prFlags = [System.Security.AccessControl.PropagationFlags]::None
$acType = [System.Security.AccessControl.AccessControlType]::Deny
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ($idRef, $regRights, $inhFlags, $prFlags, $acType)
$acl.AddAccessRule($rule)
$acl | Set-Acl -Path $regPath
$acl = Get-Acl $regPath
$acl.Access | FT *