Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm very new to using powershell, and I'm trying to convert the output of an exe to an object\table\something_useful to be able to loop through the data. I've found code converting if the data is horizontal, but not if it is vertical.

The output looks like this:

UNC Path: None
LUN Path: blah1:blah/blah
Storage System: blah1

If there are two connected, then it looks like this:

UNC Path: None
LUN Path: blah1:blah/blah
Storage System: blah1
UNC Path: None
LUN Path: blah2:blah/blah
Storage System: blah2


I'm hoping to get something that looks like the following:

UNC Path LUN Path Storage System
-------- -------- --------------
None blah1:blah/blah blah1
None blah2:blah/blah blah2

What I have tried:

sdcli.exe disk list | Tee-object -Variable DiskList
echo $DiskList
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900