Forum Discussion

wallaby's avatar
wallaby
Level 2
11 years ago

Provisioning API Failing

Hi,

I have been using a vbscript for a number of years that uses the evpm to prevent archiving the "DoNotArchive" folder in a users mailbox.  I think that this stopped working around the time we moved to Windows 2008 R2 and EV10SP4 but I can't be sure.

When the script runs now I get the error: An error occurred replacing the script parameters

I have now used the example in the EV utilities guide (About using the Provisioning API to run Policy Manager Scripts, p253) as per below:

option explicit

Dim ArrayOfParameters(0)
ArrayOfParameters(0) = "true"

Dim Enabler
Set Enabler = CreateObject("EnterpriseVault.ExchangeArchivePoint")
Enabler.Directory = "MACHINE1"
Enabler.Site = "site1" '(Entry Id or Site Name)
Enabler.ExchangeServer = "DITTO" '(Entry Id or Exchange Name)
Enabler.SystemMailbox = "EnterpriseVault-DITTO"
Enabler.MailboxDN = "/o=Eng2000/ou=First Administrative
Group/cn=Recipients/cn=Bruiser"
Enabler.SetScriptFile "C:\MyScripts\Script1.ini", ArrayOfParameters
Enabler.ExecuteScript ' runs the EVPM script against the script1.ini file after making the substitutions in the strings.

and I get the same error.  I did amend the values relevant to my site but that was it.

I raised a call with Symantec and they said I had missed the brackets on the line:

Enabler.SetScriptFile "C:\Program Files (x86)\Enterprise Vault\Scripts\EVPM\EnableScript_DONOTARCHIVETest2.ini", ArrayOfParameters

So I added them in:

Enabler.SetScriptFile ("C:\Program Files (x86)\Enterprise Vault\Scripts\EVPM\EnableScript_DONOTARCHIVETest2.ini", ArrayOfParameters)

But then got the error: Cannot use parentheses when calling a Sub

Symantec support said that they get  the same errors (with their own script out of the the utilities guide) but cannot help me any further as they don't support scripts.

 

Does anyone else use vbscript for EVPM on Windows 2008 R2 EV10SP4 and if so have you had the same issues and overcome them.

Symantec support couldn't offer an alternative for me other than I would have to manually use evpm for each of our mailboxes.  We have thousands.

 

Any help would be greatly appreciated.

Matt

 

 

 

  • Hi Andrew,

    I think I have sorted it now.  The problem was I thought that I had to run evpm against the exchange server that the mailboxes were hosted on.  I have since found out that this no longer appeares to be the case.

    The whole idea of using a script was to find out which mail server the mailbox was on and then call evpm with the correct values for exchange server and ev service account related to that exchange server.

    I have now created a evpm ini file that uses an LDAP query to target members of a certain security group.  These members are enabled for Archiving.

    I am then running evpm similar to your suggestion and adding this to a scheduled task:

    EVPM -e ExchangeServer -m EVservicembx -f c:\path\to\evpm.ini

  • i had a pretty similar requirement many years ago at a job. why cant you just list all the mailbox DNs in the INI file and run evpm one time using the input of the INI file?

    as a very rough example, your INI file would look like:

    [Directory] 
    DirectoryComputerName = EVserver 
    Sitename = EVsite 

    [Mailbox] 
    DistinguishedName = /o=organization/ou=mailboxou/cn=Recipients/cn=mailboxcname1 

    DistinguishedName = /o=organization/ou=mailboxou/cn=Recipients/cn=mailboxcname2 

    DistinguishedName = /o=organization/ou=mailboxou/cn=Recipients/cn=mailboxcname3 

    DistinguishedName = /o=organization/ou=mailboxou/cn=Recipients/cn=mailboxcnameETC 

    [Folder] 
    Name = DoNotArchive 

    and then your EVPM command line would be:

    EVPM -e ExchangeServer -m EVservicembx -f c:\path\to\evpm.ini

  • Hi Andrew,

    I think I have sorted it now.  The problem was I thought that I had to run evpm against the exchange server that the mailboxes were hosted on.  I have since found out that this no longer appeares to be the case.

    The whole idea of using a script was to find out which mail server the mailbox was on and then call evpm with the correct values for exchange server and ev service account related to that exchange server.

    I have now created a evpm ini file that uses an LDAP query to target members of a certain security group.  These members are enabled for Archiving.

    I am then running evpm similar to your suggestion and adding this to a scheduled task:

    EVPM -e ExchangeServer -m EVservicembx -f c:\path\to\evpm.ini