ladewig
1 Nickel

Output Result of Set-Item commands?

I'm using the provider to replace a VBscript that used CCTK to enable and activate TPM. When I use set-item to set values, there is visible output on the console, but no output or result that can be captured it seems. What I'd like to do is determine whether the command was successful in a programmatic way, but there doesn't seem to be any output aside from visual.

As an example, I'd like to be able to use the following and use the value of $Result to determine whether the command was successful or not. 

$result = set-item Dellsmbios:\tpmsecurity\tpmcommand activate 

Or use -ErrorVariable and -WarningVariable to set variables accordingly to determine if there was an error or warning.

As far as I can tell, all I can do is use Get-Item to see if the value is what I expect it to be or not. 

0 Kudos
1 Reply

RE: Output Result of Set-Item commands?

This is a good feedback.  We will take this into account in our next update.

We look forward to hearing more from you.

0 Kudos