Using PowerShell, I want to include the computer name with some of the returned data of the WMI query. I've studied custom columns - need something like that - but I do not know how to pass the computer name into the next loop to be included in the resulting table. For example:
Get-WmiObject -Class Win32_LogicalDisk -ComputerName MailServer01
Actually, I'm in another look where $_ is the computer name:
Get-WmiObject -Class Win32_LogicalDisk -ComputerName $_
This works great, but I want to include the ComputerName ($_) as part of the final output or report. Any ideas?