Find Index Position in two dimensional array;


hi have list of databases , status in array $dbmirroringinfo.

foreach ($db in $dbs)
{
....
$dbmirroringinfo +=,@($db,"failover in progress")
....
 }
set status particular db in $dbmirroringinfo. trying find index in $dbmirroringinfo it's status can updated?
this

foreach ($db in $dbs)
{
failover db's
if successful
$dbmirroringinfo ($db "mirroring failover completed")
else
$dbmirroringinfo ($db "mirror failover unsuccessful please contact dba")

}
print result on screen
foreach ($dbinfo in $dbmirroringinfo)
{

write-host $dbinfo[0] $dbinfo[1]

}

thanks

it sounds hash table  more appropriate array. 

[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client