Hi<\/p>\n
“hostname” | % { write-host $_ -ForegroundColor green ; (gwmi -ComputerName $_ -Namespace root\\wmi -Class mpio_disk_info).driveinfo | Select-Object {“Name: $($.name) Paths: $($<\/em>.numberpaths)”}}<\/p>\n Name: MPIO Disk0 Paths: 2 I want ouptut as below:<\/p>\n MPIO Disk0 2 Hi<\/p>\n “hostname” | % { write-host $_ -ForegroundColor green ; (gwmi -ComputerName $_ -Namespace root\\wmi -Class mpio_disk_info).driveinfo | Select-Object {“Name: $($.name) Paths: $($<\/em>.numberpaths)”}}<\/p>\n Name: MPIO Disk0 Paths: 2 I want ouptut as below:<\/p>\n MPIO Disk0 2 Create a PSCustomObject and you can easily format it the way you want.<\/p>","upvoteCount":1,"datePublished":"2022-01-23T14:27:45.000Z","url":"https://community.spiceworks.com/t/issue-on-multipathing-script/822850/2","author":{"@type":"Person","name":"gary-m-g","url":"https://community.spiceworks.com/u/gary-m-g"}},{"@type":"Answer","text":" You can use calculated properties with your Select-Object:<\/p>\n Just about every post you post, I ask you to please use the insert code button and you keep ignoring it…<\/p>\n If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>\n<\/a>Instead of below output:<\/h2>\n
<\/a>hostname
\n“Name: $($.name) Paths: $($<\/em>.numberpaths)”<\/h2>\n
\nName: MPIO Disk1 Paths: 2
\nName: MPIO Disk2 Paths: 2
\nName: MPIO Disk3 Paths: 2
\nName: MPIO Disk4 Paths: 2<\/p>\n<\/a>Name Paths<\/h2>\n
\nMPIO Disk1 2
\nMPIO Disk2 2
\nMPIO Disk3 2
\nMPIO Disk4 2<\/p>","upvoteCount":6,"answerCount":9,"datePublished":"2022-01-23T10:29:50.000Z","author":{"@type":"Person","name":"dinu03","url":"https://community.spiceworks.com/u/dinu03"},"suggestedAnswer":[{"@type":"Answer","text":"<\/a>Instead of below output:<\/h2>\n
<\/a>hostname
\n“Name: $($.name) Paths: $($<\/em>.numberpaths)”<\/h2>\n
\nName: MPIO Disk1 Paths: 2
\nName: MPIO Disk2 Paths: 2
\nName: MPIO Disk3 Paths: 2
\nName: MPIO Disk4 Paths: 2<\/p>\n<\/a>Name Paths<\/h2>\n
\nMPIO Disk1 2
\nMPIO Disk2 2
\nMPIO Disk3 2
\nMPIO Disk4 2<\/p>","upvoteCount":6,"datePublished":"2022-01-23T10:29:50.000Z","url":"https://community.spiceworks.com/t/issue-on-multipathing-script/822850/1","author":{"@type":"Person","name":"dinu03","url":"https://community.spiceworks.com/u/dinu03"}},{"@type":"Answer","text":"Select-Object @{n='Name';e={$_.Name}},@{n='Paths';e={$_.NumberPaths}}\n<\/code><\/pre>","upvoteCount":1,"datePublished":"2022-01-23T17:24:13.000Z","url":"https://community.spiceworks.com/t/issue-on-multipathing-script/822850/3","author":{"@type":"Person","name":"adminofthings","url":"https://community.spiceworks.com/u/adminofthings"}},{"@type":"Answer","text":"