Hello!
Executing the following two lines creates the files with the same number of columns:
Get-CimInstance -Query "Select * from Win32_LogicalDisk where DeviceID <> 'A:'" |Export-CSV c:\Reports\Disks.csv
Get-CimInstance -Query "Select DeviceID, DriveType, VolumeName, Size, FreeSpace from Win32_LogicalDisk where DeviceID <> 'A:'" |Export-CSV c:\Reports\Disks2.csv
Q: Why querying for specific columns yields the same result as querying for all columns (*)?
The same query written in VBscripts gives me exactly what I want - just the five columns.
Thank you in advance,
Michael