1
Vote

error: Index out of range exception

description

I'm getting an error running the tool in a large SharePoint 2013 environment with over 350 databases. The tool gets an error at line 950 and 1025. It will not report on the web app, alternate access mappings or content databases. How do I fix this?

Here is the error message:

Index was outside the bounds of the array.
At C:\2013SPSFarmReport.ps1:950 char:21
  • $global:ContentDBs[$count, $global:ContentDBcount] = $mySPCo ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : OperationStopped: (:) [], IndexOutOfRangeException
    • FullyQualifiedErrorId : System.IndexOutOfRangeException
Completed running o15enumWebApps at 8/22/2016 9:33:25 PM
Index was outside the bounds of the array.
At C:\Users\Svc-PRDSpFarm\Desktop\SPSFarmReport\SPSFarmReport\o15\2013SPSFarmReport.ps1:1025 char:14
  • $global:ContentDBProps[$count, 0] = $contentDB.Name
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : OperationStopped: (:) [], IndexOutOfRangeException
    • FullyQualifiedErrorId : System.IndexOutOfRangeException__________

comments