I have a text file, which has 1000 of entries in the way mentioned below:
Kozoscustomer
sabzeemployee
I am reading the content of text file and saving as an arrays.
$global:Content = get-content info.txt
$global:Name=$Content | foreach {
$hashTab=@{Name="" ; Info=""}
$hashTab.Name, $hashTab.Info=$_.Trim() -split '\s+'
New-Object PSObject -Property $hashTab
}
$global:Names=$ServerList | select -ExpandProperty Name
$global:Infos=$ServerList | select -ExpandProperty InfoHow do I read two arrays, I mean read the values of two arrays one by one and display the result as:
NamesInfos
KozosCustomer
sabzeemployee