To improve Windows Server I suggest you ...

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

----------------------------------------------------------

[CmdletBinding()]

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.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Cliff Harrison shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Cliff Harrison commented  ·   ·  Flag as inappropriate

        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  ·   ·  Flag as inappropriate

        But the -verbose switch of your function also applies to any cmdlet in the function that supports the switch, this is by design.

      Feedback and Knowledge Base