Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

Enterprise Vault and umlauts

Created: 12 Nov 2013 • Updated: 18 Nov 2013 | 9 comments
This issue has been solved. See solution.

We are trying to automate user deletion. So far I've set up a process which creates an ini file for evpm to reset permission and change the billing user to the service user. This works fine except for one case. When the user's archive has an umlaut in it's description the script fails with:

Creating privileged MAPI session ...
 
Parsing input file: c:\batch\eva-auto.txt
Error parsing command file: c:\batch\eva-auto.txt, error follows:
 
Line number in error:   7
Section in error:   VaultPermissions
Attribute in error: vaultname
Value in error:     Müller, Hugo
Error parsing the config (.ini) file
The ini is UCS-2 Little Endian, changing it to UTF-8 without BOM gives:
Creating privileged MAPI session ...
 
Parsing input file: c:\batch\eva-auto.txt
Error parsing command file: c:\batch\eva-auto.txt, error follows:
 
Line number in error:   0
Section in error:   Input file must be saved as Unicode
Attribute in error: <none>
Value in error:     <none>
Error parsing the config (.ini) file

UTF-8 with BOM gives:

Error - the directory computer name is not specified or value is invalid in the [DIRECTORY] section of the .ini file

The contents of the ini File is:

[Directory]
DirectoryComputerName=evserver
SiteName=evarchiv
 
 
[VaultPermissions]
vaultname=Müller, Hugo
ZAP=True
 
[ArchivePermissions]
ArchiveName=Müller, Hugo
GrantAccess = read write delete, DOMAIN\EVSA
 
[Archive]
ArchiveName=Müller, Hugo
VaultStoreName=private
BillingOwner=DOMAIN\EVSA
description=Extended for EVSA
Is there a solution to this? And if there is no solution, is there a way to use the samaccountname as an default archive name?
Operating Systems:

Comments 9 CommentsJump to latest comment

Rob.Wilcox's picture

If it helps, you can use ArchiveID instead.

 

[Archive] section of the Policy Manager initialization file

Include this section if you want to modify the properties of one or more archives.

ArchiveName

Mandatory. Identifies the archive to process.

Possible values:

  • Archive name

  • Archive ID

If the archive does not exist, Policy Manager creates a shared archive. (If you want to create mailbox archives, enable the mailboxes.)

GabeV's picture

Hello,

Is this a batch file you are modifying manually or do you have some sort of app that creates this file? Using the Archive ID will defnitely fix this issue as Rob mentioned, but if this file is being generated automatically, then you might need to pull this info from SQL.

“Success is not final, failure is not fatal: it is the courage to continue that counts.”–Winston Churchill

EV User 1211's picture

Hello,

this is a powershell script which creates the ini file. In short it fetches expired users from active directory and moves them to a "archive all" group. After x days the user is deleted. The missing part is the EV cleanup.

Thanks

JesusWept3's picture

Just as a matter of interest, if the users getting deleted, why even zap the mailbox?

GabeV's picture

If you really want to use the archiveID, you can update your PS script to access the Enterprise Vault Directory DB. This forum can give you more info on how to add SQL to your PS script:

http://irisclasson.com/2013/10/16/how-do-i-query-a...

I hope this helps.

“Success is not final, failure is not fatal: it is the courage to continue that counts.”–Winston Churchill

SOLUTION
EV User 1211's picture

Is it the dbo.Archive.VaultStoreEntryId column I'm looking for?

We zap the mailbox, so the permissions are clean i.e. no sid which wouldn't resolve later on and the permissions are in a defined state.

GabeV's picture

I am not sure what version of Enterprise Vault you are running but take a look at the ArchiveView view in the directory database and look for the VaultEntryId field. That would be the ArchiveID.

“Success is not final, failure is not fatal: it is the courage to continue that counts.”–Winston Churchill

EV User 1211's picture
Thanks everybody, this solved it.
 
Just for others, this powershell snippet takes a displayname and loads a table with VaultEntryId,
Displayname. 
$dataSource = "sqlserver"
$database = "EnterpriseVaultDirectory"
 
#$user = "user"
#$pwd = "1234"
 
#$connectionString = "Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=False;"
$connectionString = "Server=$dataSource;Database=$database;Integrated Security=True;"
 
$query = "SELECT [VaultEntryId], [ArchiveName] FROM [EnterpriseVaultDirectory].[dbo].[ArchiveView] WHERE [ArchiveName] = '{0}'" -f $displayName
 
 
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
#$connection.ConnectionString = "Server=$dataSource;Database=$database;Integrated Security=True;"
 
$connection.Open()
$command = $connection.CreateCommand()
$command.CommandText  = $query
 
$result = $command.ExecuteReader()
 
$table = new-object “System.Data.DataTable”
$table.Load($result)
 
$connection.Close()
GabeV's picture

Glad to help !!

“Success is not final, failure is not fatal: it is the courage to continue that counts.”–Winston Churchill