Added those lines "Here's the virtual server profile list" $virtualserverprofilelist "Here's the object type" $virtualserverprofilelist.gettype()
Post running got below output 2017-01-11 05:30:28 Fetching information about /Common/ Cannot index into a null array. At C:\inetpub\wwwroot\updated-Bigipreport-4.3.0.ps1:1009 char:4 + $virtualserverprofilelist[$i] | ForEach-Object { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray
Cannot index into a null array. At C:\inetpub\wwwroot\updated-Bigipreport-4.3.0.ps1:1017 char:4 + $virtualserverprofilelist[$i] | ForEach-Object { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray
Cannot index into a null array. At C:\inetpub\wwwroot\updated-Bigipreport-4.3.0.ps1:1065 char:5 + $objTempVirtualServer.sourcexlatetype = [string]$virtualserversourceaddresst ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray
Cannot index into a null array. At C:\inetpub\wwwroot\updated-Bigipreport-4.3.0.ps1:1066 char:5 + $objTempVirtualServer.sourcexlatepool = [string]$virtualserversourceaddresss ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray
This is line 1009 $virtualserverprofilelist[$i] | ForEach-Object { 1009 >>>>> $virtualserverprofilelist[$i] | ForEach-Object { 1010>>>>>>if( -eq "PROFILE_TYPE_CLIENT_SSL"){ 1011>>>>>>$objTempVirtualServer.sslprofile = $_.profile_name; 1012>>>>>>} 1013>>>>>>}
This is line 1017 $virtualserverprofilelist[$i] | ForEach-Object {