cancel
Showing results for 
Search instead for 
Did you mean: 

powershell to query open/closed Index

AriesN
Level 3

Product:Ent. Vault 9.0

I want to create a script that will generate a report and show me what are the drives where indexes are closed or open. I ran  get-command on Evault Management shell but couldnt find cmdlet that may relate to index (e.g Get-Index) . Is there any?

evault_indexes_0.JPG

Thanks,

 

Aries

1 ACCEPTED SOLUTION

Accepted Solutions

Pradeep-Papnai
Level 6
Employee Accredited Certified

User following (modified) query with server name.

use EnterpriseVaultDirectory
select IP.IndexRootPath, IP.IndexRootPathStatus, CE.ComputerName, CE.ComputerNameAlternate
from IndexRootPathEntry ip,ComputerEntry CE,IndexingServiceEntry ISE
where CE.ComputerEntryId = ise.ComputerEntryId and
ip.IndexServiceEntryId= ise.ServiceEntryId

'0' means open & '1' means close.

View solution in original post

6 REPLIES 6

BillieBachra
Level 4
Partner Accredited Certified

There isn't such a command, no.

Pradeep-Papnai
Level 6
Employee Accredited Certified

I am not sure via powershell, but you can get this information from SQL query.

Note down IndexServiceEntryID

use EnterpriseVaultDirectory
select CE.ComputerName, CE.ComputerNameAlternate, ise.ServiceEntryId from ComputerEntry CE
INNER JOIN IndexingServiceEntry ISE
ON CE.ComputerEntryId = ise.ComputerEntryId


Ran following query (Replace the value got in step 1).

use EnterpriseVaultDirectory
select IndexRootPath, IndexRootPathStatus, IndexServiceEntryId
from IndexRootPathEntry
where IndexServiceEntryId = 'STEP1'


'0' means open & '1' means close.
 

Pradeep-Papnai
Level 6
Employee Accredited Certified

User following (modified) query with server name.

use EnterpriseVaultDirectory
select IP.IndexRootPath, IP.IndexRootPathStatus, CE.ComputerName, CE.ComputerNameAlternate
from IndexRootPathEntry ip,ComputerEntry CE,IndexingServiceEntry ISE
where CE.ComputerEntryId = ise.ComputerEntryId and
ip.IndexServiceEntryId= ise.ServiceEntryId

'0' means open & '1' means close.

AKL
Level 6
Certified

I uploaded script for similar task back in 2012, you can check it out here, should save some work:

https://www-secure.symantec.com/connect/downloads/automate-backup-mode-check-email-reporting

You can use the script as-is or pull cmdlets for index location particularly.

Pradeep-Papnai
Level 6
Employee Accredited Certified

Do you need any more information from this post?

 

John_Santana
Level 6

Cool man, it works quickly and easily.