Archive

Articles taggués ‘Enterprise Vault’

Vérification des services Enterprise Vault

Le script que j’utilise pour rapidement vérifier si tous les services nécessaire à Entreprise Vault sont démarrés sur une liste de serveurs.

?View Code POWERSHELL
$servers = "SRV00045","SRV00046"
foreach ($server in $servers) {
Get-Service -ComputerName $server | Where-Object { $_.name -like "EnterpriseVault*" -or $_.name -eq "MSMQ"} | ft $server,Status,Name,DisplayName
}

Contrôle des files MSMQ

Voici le script que j’utilise pour contrôler l’état des files MSMQ sur les serveurs Symantec Entreprise Vault.

?View Code POWERSHELL
$servers = "SRV00045","SRV00046"
foreach ($server in $servers) {
$server
"-"*10
Get-WmiObject Win32_PerfFormattedData_MSMQ_MSMQQueue -computer $server | Sort-Object -property "MessagesinQueue" -descending | Where-Object { $_.MessagesinQueue -ne "0" } | ft Name,MessagesinQueue
}
Categories: Symantec Tags: ,

Exporter les statistiques de Enterprise Vault

Enterprise Vault
Voici comment j’exporte les statistiques d’archivage dans Symantec Enterprise Vault.

?View Code POWERSHELL
$Server = "server30"
$Database = "EVaultStoreArchive1"
$AttachmentPath = ".Export_EVEV_1_Stats.csv"
$SqlQuery = "SELECT [ArchiveName], ArchivedItems, CAST(ArchivedItemsSize AS decimal(20, 0)) AS ArchivedItemsSize From view_ListVaults INNER JOIN [EnterpriseVaultDirectory].[dbo].[ArchiveView] ON view_ListVaults.ArchivePointId = [EnterpriseVaultDirectory].[dbo].[ArchiveView].[VaultEntryId]"
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Data Source=$Server;Initial Catalog=$Database;Integrated Security = True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandText = $SqlQuery
$SqlCmd.Connection = $SqlConnection
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $SqlCmd
$DataSet = New-Object System.Data.DataSet
$nRecs = $SqlAdapter.Fill($DataSet)
$nRecs | Out-Null
$objTable = $DataSet.Tables[0]
$objTable | Export-CSV $AttachmentPath
Write-Host "Export terminé."
$resfile = New-Item -ItemType file -Path ".Export_EVEV_1_Stats_Result.csv" -Force
Add-Content -Path $resfile -Value "FirstOU,Name,ArchivedItems,ArchivedItemsSize,VaultCache,OrganizationalUnit"
$evnom = "CN=EV_NOMADES,CN=Users,DC=domain,DC=local"
$InputFile = import-csv -Path $AttachmentPath
foreach ($Mailbox in $InputFile)
{
$user = Get-QADUser -Identity $Mailbox.ArchiveName
$user.Name
if ($user.NestedMemberOf -contains $evnom )
{$vaultchache = "True"}
Else
{$vaultchache = $null}
$FirstOU = $User.ParentContainer -split("/")
$FirstOU = $FirstOU[1]
Add-Content -Path $resfile -Value "$($FirstOU),$($Mailbox.ArchiveName),$($Mailbox.ArchivedItems),$($Mailbox.ArchivedItemsSize),$($vaultchache),$($user.ParentContainer)"