Start a Conversation

Unsolved

This post is more than 5 years old

84692

November 17th, 2015 02:00

How to suppress success outputs from console

I am using the PSProvider 1.0 on WinPE 10 x64 and it works great. But when using it in Scripts, a simple UI problem comes up: I'm not able to suppress cmdlet output at console. I.e.

  Set-Item -Path DellSMBIOS:\SystemInformation\OwnershipTag "Me myself"

If this command fails, the error is pipelined to the Powershell error stream as expected.
Else if command is successfully executed, it returns "SUCCESS." at console and I expected, this is from the Powershell output/success stream. But the following commands each returns a line with "SUCCESS." too:

  Set-Item -Path DellSMBIOS:\SystemInformation\OwnershipTag "Me myself" *>null

  $null = Set-Item -Path DellSMBIOS:\SystemInformation\OwnershipTag "Me myself"

  Set-Item -Path DellSMBIOS:\SystemInformation\OwnershipTag "Me myself" | Out-Null

Same issue with Import-Module cmdlet.
This is some kind of disruptive for scripts where you want to use console as user (presence) interface. Especially when UI language isn't english.

Does anybody know another way how to suppress the success output of these cmdlets?

November 22nd, 2015 21:00

Hi, 

We are doing investigation on this. Will get back to you asap.

38 Posts

November 23rd, 2015 22:00

The "SUCCESS" message is written to the console , hence cannot be redirected. Probably, in next release, we will send the console messages to PowerShell pipeline.

Thanks for using DCPP and your feedback.

Vibha

No Events found!

Top