Optimizing PowerShell Objects
I recently posted an article on my blog about formatting property names from a Directory Searcher result. While that article and its accompanying code were specific to using the Directory Searcher, the concepts have a broader application in PowerShell, especially if you are working with custom objects. You can create a custom object as easily as this:
$Object = [PSCustomObject]@{
Name = "Foo"
location = "London"
SIZE = 64
assetId = "KB4982-913"
}
Or perhaps you are importing data from a CSV file.
import-csv C:\scripts\modulereport.csv
Want to read the full issue?