Unsolved
1 Rookie
•
4 Posts
0
20
PowerShell Module for PowerStore Import message ...
Hi,
I'm trying to create a powershell script that will connect to a PowerStore array and get some info. The script is running as expected but I cannot get rid of the powershell module message that is displayed whenever I import the module. This only happens on the first "Import-Module Dell.PowerStore" command. If I don't use "Import-Module Dell.PowerStore", as the module is installed it will be automatically loaded when the first command will be used, for example Connect-Cluster -hostName ... but the message is still displayed as the module is loaded in the background.
The script is running fine but if you have some user interaction this will ruin your layout and create user confusion.
Is there a method to get rid of this message when the module is loaded ? I've tried redirecting to $null, | out-null but no luck, the message is still there. 3>$null is working for the warnings but the main message cannot be hidden.
Thank you !
DanMaracineanu
1 Rookie
1 Rookie
•
4 Posts
0
July 22nd, 2024 17:48
It seems like 6>$null redirection will get rid of the information message of the module. Never use it, so the command that will get a clean result is:
Import-Module Dell.PowerStore 3>$null 6>$null