I made this script to display the values of disk spaces of multiple remote computers, but i need to add a filter to display only drives that are below 2% disks-space and to add the machine name to the table
Get-WmiObject Win32_LogicalDisk -ComputerName computer1, computer2, computer3 -Filter DriveType=3 | Select-Object DeviceID, @{'Name'='Size (GB)'; 'Expression'={[string]::Format('{0:N0}',[math]::truncate($_.size / 1GB))}}, @{'Name'='Freespace (GB)'; 'Expression'={[string]::Format('{0:N0}',[math]::truncate($_.freespace / 1GB))}}