Page 2 of 2

Re: output issues

Posted: Wed Oct 31, 2018 7:52 am
by mqh777
thanks but prompting for a password will not work for our needs. I have piped my get-tpm to a .TXT file and I can read the .txt file and display the contents. But the issue is the data will display like this:

Code: Select all

PSComputerName            : targetPC RunspaceId                : ab733a29-fa1c-4057-80b9-082c7f890302 TpmPresent                : True TpmReady                  : False ManufacturerId            : 1464156928 ManufacturerIdTxt         : WEC  ManufacturerVersion       : 5.81  ManufacturerVersionFull20 : Not Supported for TPM 1.2 ManagedAuthLevel          : Full OwnerAuth                 : OwnerClearDisabled        : False AutoProvisioning          : Enabled LockedOut                 : False LockoutHealTime           : Not Supported for TPM 1.2 LockoutCount              : Not Supported for TPM 1.2 LockoutMax                : Not Supported for TPM 1.2 SelfTest                  : {255, 1, 2, 5...}
How do I make it display properly in the RTB?

Re: output issues

Posted: Wed Oct 31, 2018 10:22 am
by jvierra
Pleas go back and recopy the code I posted. It works and solves the issue. I have posted two methods.

Re: output issues

Posted: Wed Oct 31, 2018 10:59 am
by mqh777
I've tried all of your code and it does not work. This line produces no output. $richtextbox_output.Lines = $tpm_lines[0] | Out-String | %{$_ -replace '\0'} In fact using the .Lines produces no output. We can't prompt for a user\password. I can get it all into a .txt file but the RTB does not display the contents in a neat way.

Re: output issues

Posted: Wed Oct 31, 2018 11:07 am
by jvierra
Please use this code.

You did not go back and recopy the code I posted.