prepend each object
Posted: 2021-Dec-20, 2:48 pm
I'm relatively new to powershell, so forgive me for what is likely a simple question. Is there a way to prepend text to individual objects like this:
I'd like to prepend different text to each object. For example, I'd like the output of $objects.'Total Physical Memory' to be something like this:
TPM:32,606 MB
For $objects.'Available Physical Memory', I'd like:
APM:23,045 MB
Thank you in advance.
Code: Select all
$objects = systeminfo.exe /FO CSV 2>&1| ConvertFrom-Csv; $objects.'Total Physical Memory'; $objects.'Available Physical Memory'; $objects.'Virtual Memory: Max Size'; $objects.'Virtual Memory: Available'; $objects.'Virtual Memory: In Use'
TPM:32,606 MB
For $objects.'Available Physical Memory', I'd like:
APM:23,045 MB
Thank you in advance.