PowerShell object property access¶
In PowerShell, variables holding objects allow direct access to their specific data fields and structures using the dot notation (.).^[600-developer__learn-powershell01.md]
Dot Notation¶
To access a specific property, append a period and the property name to the variable (e.g., $Variable.Property).^[600-developer__learn-powershell01.md] For example, to access the environment settings of a process object stored in $A, you can target the StartInfo property followed by its sub-property Environment using $A.StartInfo.Environment.^[600-developer__learn-powershell01.md]
This syntax allows for traversing nested object structures, enabling the retrieval of detailed data embedded within the main object.^[600-developer__learn-powershell01.md]
Related Concepts¶
[[PowerShell]]
Sources¶
^[600-developer__learn-powershell01.md]