#size the script results window function windowSize { $pshost = get-host $pswindow = $pshost.ui.rawui $newsize = $pswindow.buffersize $newsize.width = 125 $newsize.height = 3000 $pswindow.buffersize = $newsize $newsize = $pswindow.windowsize $newsize.width = 100 $newsize.height = 55 $pswindow.windowsize = $newsize Clear-Host } #format the output function formatLine($strIn) { $num = $strIn.Length for($i=1; $i -le $num; $i++) {$formatLine+= "="} Write-Host -ForegroundColor $colorForeGroundDefault " `n$strIn " Write-Host -ForegroundColor $colorForeGroundDefault $formatLine } #check for each reg entry function regcheck { param($path, $key, $val) $psc = get-itemproperty -path $path formatLine ($key) Write-Host "$path\$key" if ($psc.$key -eq $val) { write-host -ForegroundColor Green "[PASSED] " } else { write-host -ForegroundColor Red "[FAILED] " } } #check the boot.ini file for 3GB and PAE function bootini { $bi = 0 $fileContents = Get-Content -path "$env:systemDrive\boot.ini" # Write-host -ForegroundColor White formatline "Check boot.ini for /3GB and /PAE (line-by-line)" Switch -regex ($fileContents) { "/3GB" {write-host -ForegroundColor Red "`n[/3GB CHECK FAILED]`n"} "/PAE" {write-host -ForegroundColor Red "`n[/PAE CHECK FAILED]`n"} default {write-host -ForegroundColor Green "[PASSED]"} } # Write-host `n } # End of function $colorForeGroundDefault = "White" windowsize Set-ExecutionPolicy Remotesigned formatline "Enterprise Vault Best Practice Registry Keys and Boot.ini Settings" Write-host -ForegroundColor White "See http://support.veritas.com/docs/326236 for more information related to these settings." Write-host `n bootini formatline "Enterprise Vault 8.0 REGISTRY SETTINGS" Write-host -ForegroundColor White "The following settings can now be set automatically in EV8 but are applicable in all `nversions of the product:" regcheck "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" "PagedPoolSize" "-1" regcheck "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" "PoolUsageMaximum" "60" regcheck "HKLM:\SOFTWARE\Microsoft\MSMQ\Parameters" "KernelMemThreshold" "95" regcheck "HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" "DisableStrictNameChecking" "1" regcheck "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" "DisableLoopbackCheck" "1" regcheck "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "MaxUserPort" "65534" regcheck "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" "TcpTimedWaitDelay" "120" regcheck "HKLM:\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters" "OplocksDisabled" "1" Write-host `n Write-host -ForegroundColor White "The following settings are general best practise settings for all versions of Enterprise Vault:" regcheck "HKLM:\SOFTWARE\KVS\Enterprise Vault\Indexing" "MaxMSMQMessageSize" "3670016" Write-host -ForegroundColor Red -BackgroundColor White "Note: Redundant as of EV2007 SP4 when this issue was fixed!`n" regcheck "HKLM:\SOFTWARE\KVS\Enterprise Vault\Directory\DirectoryService" "ArchiveListChunkThreshold" "1000" #formatline "AVSMaxLoc" #Write-host "HKLM:\SOFTWARE\KVS\Enterprise Vault\Indexing\AVSMaxLoc" regcheck "HKLM:\SOFTWARE\KVS\Enterprise Vault\Indexing" "AVSMaxLoc" "500000000" Write-host -ForegroundColor Red -BackgroundColor White "Note: This setting is no longer recommended or required`n and is now defaulted to 1billion" regcheck "HKLM:\SOFTWARE\KVS\Enterprise Vault\Indexing" "SchemaType" "1" regcheck "HKLM:\SOFTWARE\KVS\Enterprise Vault\Indexing" "SearchChunkSize" "5000" Write-host `n Write-host -ForegroundColor Green "[ALL CHECKS COMPLETE]`n"