Too Many Information in Executable Console

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
DRVBBRobK
Posts: 2
Last visit: Sun Feb 18, 2024 10:05 pm

Too Many Information in Executable Console

Post by DRVBBRobK »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Sapien Powershell Studio
Operating system: Windows 10
PowerShell version(s): 5.8.211

*** Please add details and screenshots as needed below. ***

Hi,

my problem is, I have to many information in an exectuable console Script.
I use commands from the module DHCPServer.
Every command will be displayed in the console. How can I deactivate this, when I compile the script to a exectuable.
ExecutableConsole.png
ExecutableConsole.png (385.13 KiB) Viewed 2158 times
If I use a foreach the command will be repeat for every scope in the DHCP.
The script will be shown in the DHCP, is an PC in the DHCP.

Thanks for your help,
Robert

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Too Many Information in Executable Console

Post by brittneyr »

You can try piping the selected output to Out-Null or assign it to the $null variable. Such as:
  1. ... | Out-Null
  2. $null = ...
You also can always adjust your output preferences to remove unwanted output. If this is progress being reported from the command, you can set the $ProgressPreference like this:
  1. $ProgressPreference="SilentlyContinue"
You find the following discussion helpful:
viewtopic.php?t=10245
Brittney
SAPIEN Technologies, Inc.
DRVBBRobK
Posts: 2
Last visit: Sun Feb 18, 2024 10:05 pm

Re: Too Many Information in Executable Console

Post by DRVBBRobK »

Hello,

the first think doesn't work.
The second works. I add this line in my script, compile and run.

Thank you very much.

Regards,
Robert
This topic is 1 year and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.