How to access a property from an object using a variable name? How to access a property from an object using a variable name? powershell powershell

How to access a property from an object using a variable name?


Just use double quotes after the dot:

$attribute = 'DebugBackgroundColor'$psISE.Options."$attribute"