cancel
Showing results for 
Search instead for 
Did you mean: 

Enterprise Vault and umlauts

EV_User_1211
Level 2

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?
1 ACCEPTED SOLUTION

Accepted Solutions

GabeV
Level 6
Employee Accredited

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-sql-server-db-using-powershell-and-how-do-i-filter-format-and-output-to-a-file-stupid-question-251-255/

I hope this helps.

View solution in original post

9 REPLIES 9

Rob_Wilcox1
Level 6
Partner

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.)

Working for cloudficient.com

GabeV
Level 6
Employee Accredited

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.

EV_User_1211
Level 2

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
Level 6
Partner Accredited Certified
Just as a matter of interest, if the users getting deleted, why even zap the mailbox?
https://www.linkedin.com/in/alex-allen-turl-07370146

GabeV
Level 6
Employee Accredited

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-sql-server-db-using-powershell-and-how-do-i-filter-format-and-output-to-a-file-stupid-question-251-255/

I hope this helps.

EV_User_1211
Level 2

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
Level 6
Employee Accredited

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.

EV_User_1211
Level 2
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
Level 6
Employee Accredited

Glad to help !!