Messaging system - activity and ability to really stop it #8694
wsmelton
started this conversation in
Contributors
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[Update] - As of v2.0 release you can now disable the messaging and maintenance runspaces prior to importing the module.
Set the following environment variables in your system or session:
Doing this before import will ensure the runspaces noted below do not start up, and additional connections for TEPP are not made to your systems during your session.
We don't seem to offer any viable way of turning off the message system, so it won't be so chatty on a given system.
If you
Import-Module dbatools
, by default, we spin up 3 runspaces right off:You get rid of these using:
[Update]: Which we seem to do if we detect PowerShell ISE is in use:
dbatools/dbatools.psm1
Lines 1010 to 1018 in b8fe960
At some point in the past parameter option was added to our PSM1 file where you can pass in an argument to
Import-Module
where serial import was occurr. So you can do this to get that same affect that having$dbatools_serialimport = $true
set before you did the import:The logging runspace is where I believe all of our message system lives. The messaging system we have is loosely based on PSFrameworks (or the beginning birth of that module) but is no longer exact implementation of that module; customized for dbatools. The sections below layout the configuration options both with messages (color, output options, mode) that you can configure and the logging (this is where the runspace comes into play).
The current process that I'm seeing is the runspace spins up and then a log is created in the path set under the config
path.dbatoolslogpath
. Since those are spun up after import even if a user sets the configuration to disable it, those runspaces still continue to run unless you explicitly kill them.I would love to have a parameter option added to the PSM1 that would allow passing in a key/value pair to say if XYZ is passed in pre-set the configuration category of ABC values to disabled/false/whatever.
Messaging Configuration
Logging Configuration
Path Configuration
Beta Was this translation helpful? Give feedback.
All reactions