Wednesday, January 7, 2026

PowerShell: filter output with value

 #require PowerShell core 

Install-PSResource FineFormat

Install-Module -Name FineFormat -scope CurrentUser

#The output show a lot of empty values

Get-CimInstance Win32_operatingSystem -Property FreePhysicalMemory,TotalVisibleMemorySize

#Only show output with value

Get-CimInstance Win32_operatingSystem -Property FreePhysicalMemory,TotalVisibleMemorySize | Format-Fine -HasValue

No comments:

Post a Comment

PowerShell: filter output with value

 #require PowerShell core  Install-PSResource FineFormat Install-Module -Name FineFormat -scope CurrentUser #The output show a lot of empty ...