Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Create a nested PowerShell custom object

$
0
0

Summary: Learn how to create a nested PowerShell custom object.

Hey, Scripting Guy! Question How do I create a nested PowerShell custom object to store layers (nested) of information?

Hey, Scripting Guy! Answer Use a hashtable with the PSCustomObject type accelerator, and specify PSCustomObject as the value to the Property Name (Key):

[PSCustomObject]@{
PropertyName = [PSCustomObject]@{ NestedPropertyName = ‘NestedPropertyValue’ }
}

7610.Dr.ScriptoForTips


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>