I wrote a function which creates AD users and their mailboxes in bulk by using input .csv file. In order to run Enable-Mailbox cmdlet I put these lines in BEGIN script block:
$exchsession = New-PSSession -ConfigurationName microsoft.exchange `
Import-PSSession $exchsession -DisableNameChecking | Out-Null
I have many Write-Verbose cmdlets in my function but having called function with -Verbose parameter there are VERBOSE: Importing function ‘…’ for each imported function. How to suppress these VERBOSE lines only for Import-PSSession cmdlet?