How do i format the output of a powershell command?
-
Microsoft documentation for Format-List: https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Format-List?view=powershell-6
A format without filtering.
PS /home/training> get-process | format-list ... ... ... Id : 38 Handles : CPU : 0 SI : 0 Name : watchdogd ... ... ...
A format filtering for Name of the process.
PS /home/training> get-process | format-list -property Name ... ... ... Name : systemd-journal Name : systemd-logind Name : systemd-udevd Name : tuned Name : watchdog/0 Name : watchdog/1 ... ... ...
© Lightnetics 2024