SELECT [Name]
FROM [AppSensePersonalizationDB].[dbo].[User]
WHERE [DomainName] = 'DOMAIN'
Please note, my DB name is AppSensePersonalizationDB, yours probably has different name
Then save the result as a txt file, e.g. users.txt, which has entry like the following:
user1
user2
user3
You have to install AppSense EM Manager Tools to be able to use the EMPRegUtil. Once installed, create a batch file:
@echo off
SET EMPRegUtilConnectionString=Data Source=EMDB;Initial Catalog=AppSensePersonalizationDB;Integrated Security=SSPI
for /f "tokens=*" %%i IN (users.txt) DO call:doit %%i
:doit
if "%~1" == "" goto end
@echo %~1
@echo exporting MS Office 2010 Outlook profiles...
EMPRegUtil EXPORT DOMAIN\%~1 "Production" "MS Office 2010" "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook" C:\temp\%~1.reg
@echo deleting MS Office 2010 Outlook profiles...
EMPRegUtil DELETE DOMAIN\%~1 "Production" "MS Office 2010" "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem"
@echo deleting Session Data Outlook profiles...
EMPRegUtil DELETE DOMAIN\%~1 "Production" "Session Data" "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem"
@echo importing to Session Data Outlook profiles...
EMPRegUtil IMPORT DOMAIN\%~1 "Production" "Session Data" C:\temp\%~1.reg
:end
Please note:
my database server name is: EMDB
Run the batch script, it will export the Outlook profile from Managed application, delete the registry from managed application, delete the registry from session data and import the registry back to session data
No comments:
Post a Comment