From the course: Complete Guide to PowerShell 7
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Select object properties - PowerShell Tutorial
From the course: Complete Guide to PowerShell 7
Select object properties
- [Instructor] Selecting properties allows you to extract only the data that matters, reducing the noise in your script output. For instance, if get dash process returns dozens of properties, but you only care about name and CPU, selecting these properties makes the output concise and manageable. This is especially useful in reporting scenarios where clarity is crucial. Custom properties transform raw data into actionable insights by adding fields that calculate or summarize existing data. For example, converting a file size from bytes to megabytes makes the data more readable and actionable, especially when presenting information to non-technical stakeholders and producing reports and needing further insights. Combining the where dash object for filtering and the select dash object for property selection ensures, your scripts process only what's necessary. This reduces computational overhead and enhances the readability of your output. For instance, filtering services by their status…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Understanding PowerShell objects5m 6s
-
(Locked)
Inspect objects with Get-Member10m 55s
-
(Locked)
Select object properties5m 51s
-
(Locked)
Sorting objects3m 45s
-
(Locked)
Filtering objects4m 33s
-
(Locked)
Creating custom objects8m 27s
-
(Locked)
Extending objects with methods10m 26s
-
(Locked)
Converting objects to different formats9m 17s
-
(Locked)
-
-
-
-
-
-
-
-