Suppress Output #2626
Unanswered
Leighton365
asked this question in
Q&A
Suppress Output
#2626
Replies: 3 comments 6 replies
-
Can you please give code samples?
Out-null should do it
søn. 11. dec. 2022 14.20 skrev Leighton365 ***@***.***>:
… Hi all,
I was wondering, is it possible to suppress output from PnP commands.
I have tried | out-null and a number of other options [void] etc, but
nothing appears to work.
My script has a menu system and as the user runs each option, I'd like it
to show that section is in progress, rather than all of the command output.
I am using PnP-TraceLog to capture information/errors and determine whether
there was an error.
Just trying to make everything as neat as possible.
Thanks in advance!
Leighton
—
Reply to this email directly, view it on GitHub
<#2626>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMTDTU5QVW75RBPNLDVF7DWMXIJDANCNFSM6AAAAAAS27CGV4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Having an assignment when using out-null does not make sense ;)
In what way does it interfere? It should not send output to any stream
(output, warning, verbose)
søn. 11. dec. 2022 15.30 skrev Leighton365 ***@***.***>:
… Hi AndersRask,
Thanks for the quick reply.
The one line i'd really like to suppress output on is:
$null = Invoke-PnPSiteTemplate -InputInstance $tmpLists -Connection
$global:newsite -ErrorAction Silentlycontinue | Out-Null
It really screws up the terminal as it runs. It's in a foreach loop.
—
Reply to this email directly, view it on GitHub
<#2626 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMTDTWNPIKBNLJS7FKLOGTWMXQO5ANCNFSM6AAAAAAS27CGV4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
4 replies
-
That is not output it is just process indicator.
Setting process default as specified in my earlier message should disable
this
søn. 11. dec. 2022 16.09 skrev Leighton365 ***@***.***>:
… Here's an example of the output I get even piping to Out-Null
[image: Untitled]
<https://user-images.githubusercontent.com/86303200/206911501-588ae8b6-3b9e-4c8f-8678-486f28922f13.png>
I'm sure it's not my menu, as the command always outputs to screen, even
when I run it on it's own.
—
Reply to this email directly, view it on GitHub
<#2626 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMTDTSOSINOL3PF6TEO2RTWMXVBLANCNFSM6AAAAAAS27CGV4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I was wondering, is it possible to suppress output from PnP commands.
I have tried | out-null and a number of other options [void] etc, but nothing appears to work.
My script has a menu system and as the user runs each option, I'd like it to show that section is in progress, rather than all of the command output. I am using PnP-TraceLog to capture information/errors and determine whether there was an error.
Just trying to make everything as neat as possible.
Thanks in advance!
Leighton
Beta Was this translation helpful? Give feedback.
All reactions