Bug: In New-FileCatalog
This bug also applies to Test-FileCatalog, I believe.
Create a script containing the following commands, and run it with the -Verbose switch
param ( $path = 'SOMEPATHOROTHER' )
New-FileCatalog -Path $path -CatalogFilePath C:\Source.cat -CatalogVersion 2.0
New-FileCatalog -Path $path -CatalogFilePath C:\Destination.cat -CatalogVersion 2.0
The output will contain VERBOSE output, even though the script does not contain any Write-Verbose commands.
Cliff Harrison commented
Try changing the 'New-FileCatalog' cmdlet with another, like Get-ChildItem, or Get-Item, or Write-Output, all of which support the -Verbose switch, and you will find that none of them display any verbose output.
JB Lewis commented
But the -verbose switch of your function also applies to any cmdlet in the function that supports the switch, this is by design.