I generally like to use write-verbose statements as a form of documentation and troubleshooting when working on a script. But some commands like get-mailbox produce more verbose output then I would like and it makes searching for the write-verbose statements I specified difficult. Iâ€™ve tried setting the verbose preference manually before and after a get-mailbox command:
but I still get around 7 lines of verbose messages (which is less than if I didnâ€™t set either verbose method). Is this just how these cmdlets work or is there something I can do to surpress these messages when I want verbose output from everything else in the script?
Is that a Exchange EMS environment, or are you importing an Exchange management session and using implicit remoting?Â In an implicit remoting session what you're actually getting are proxy functions, and I've noticed that sometimes the common paramters don't work like you expect them to with those proxy functions.
Rob, thanks for the reply. I am importing the session which and your explanation is more than likely what is happening. SoÂ I guess the verbose messages Iâ€™m getting are actually from the proxying of the cmdlets and not the cmdlets themselves. Which would explain why I can reduce some of the verbose output but not all of it.
The topic ‘Supressing verbose for certain commands when using the verbose paramter?’ is closed to new replies.