Score:0

Powershell: get-volume -> export-excel, "Driverletter" displayed as '0' instead of Letters

dj flag

I am having a difficult time understanding why the exported excel is showing 0 under "DriveLetter" instead of actual drive letters like C, D etc... The script is simple:

Get-Volume | Select-Object -Property DriveLetter,FriendlyName,DriveType,HealthStatus,OperationalStatus,SizeRemaining,Size | Export-Excel c:\temp\exceltest.xlsx -WorksheetName PC1

if you look at the screenshot you will see that DriveLetter is '0' for all my drives.

Export-Excel file screenshot

What is interesting is if I were to run the command in console I see the drive letter as expected, even Export-CSV reports the drive letters. Any ideas?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.