Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Parse a text file

$
0
0

Hi Guys,

I have to parse a text file with recurring informations from different items. Looking like this.

Slot #1
Servername: SRV00001
Type: Blade
Model: Dell
Slot #2
Servername: SRV00002
Type: RackMounted
Model: HP
Slot #3
Info: No Server Installed
Slot #4 .....

What I like to have is a table looking like this:

Slot           Servername      Type  
1               SRV00001         Blade
2               SRV00002         RackMounted
3               NoServerInstalled
4 ....

I'm thinking about using an array to fill in this informations, but I didn't find a way so far to loop for every serer slot. Any help would be appreciated.

Thanks,
Thomas


Viewing all articles
Browse latest Browse all 10624

Trending Articles