-
Notifications
You must be signed in to change notification settings - Fork 60
Supress Module Warning #48
Comments
Hello Bernd, If the
And then load this script at logon in your SessionConfiguration file:
|
i have created the script, the execution policy is unrestricted. But I get the same Warning messages as bevore. The Warning comes when JEA Loads the Module. |
OK, you may try to load the module inside the script instead of the loading it with the session configuration. |
i have tried the import-module with -DisableNameChecking -WarningAction 0, but get the same warning message. WARNING: The names of some imported commands from the module 'ExchangeConfig' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. |
Do you call |
Yes, and if i start the Script in a normal Shell, there is no Warning message visible. But in the JEA Session the warning is shown.
Von: Julien Nury <[email protected]>
Antworten an: PowerShell/JEA <[email protected]>
Datum: Donnerstag, 26. Juli 2018 um 13:39
An: PowerShell/JEA <[email protected]>
Cc: Bernd Dausch <[email protected]>, Author <[email protected]>
Betreff: Re: [PowerShell/JEA] Supress Module Warning (#48)
Do you call Import-Module after $WarningPreference = 'SilentlyContinue' ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The correct syntax would be If it doesn't work, try If it still doesn't work, it may be a bug in the way snap-in modules are loaded ... |
I try both. But the Warning is still shown.
Von: Julien Nury <[email protected]>
Antworten an: PowerShell/JEA <[email protected]>
Datum: Donnerstag, 26. Juli 2018 um 13:51
An: PowerShell/JEA <[email protected]>
Cc: Bernd Dausch <[email protected]>, State change <[email protected]>
Betreff: Re: [PowerShell/JEA] Supress Module Warning (#48)
The correct syntax would be Import-Module 'ExchangeConfig' -DisableNameChecking -WarningAction 'SilentlyContinue'
If it doesn't work, try Import-Module 'ExchangeConfig' 3>$null
If it still doesn't work, it may be a bug in the way snap-in modules are loaded ...
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi,
we use JEA for our Monitoring Software to monitor Exchange server.
we create a module to load the Exchange pssnapins and add the module to ModulesToImport.
This works, but the monitoring software put all console output to the monitoring Software.
When JEA Loads the Module, the Module generates a Warning and the warning ist on top of the console output, so i can't see the Interesting Output of the script.
Is there an option or can you add one, to supress the warning or set the WarningAction to silentlyContinue?
Regards,
Bernd
The text was updated successfully, but these errors were encountered: