Skip to content

New-FileCatalog creates 0-byte .CAT file, breaks cmd replay #3068

Closed

Description

Using -Whatif with new-filecatalog creates a 0-byte .CAT file.

Expected Behavior
Using -Whatif should have no impact on the system, so that removing -Whatif and replaying the command will succeed.

Current Behavior
Current behavior prevents replaying the command without -Whatif because the 0-byte .Cat file is present.
That file cannot be over-written without adding -Force, so replaying the command fails.
Possible Solution
No .Cat file should be created if -Whatif is specified.

Your Environment
$PSVersionTable

Name Value

PSVersion 5.1.14393.693
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Get-Command new-filecatalog
Cmdlet: New-FileCatalog 3.0.0.0
Microsoft.PowerShell.Security

Activity

  1. iSazonov commented on Jan 30, 2017

    @iSazonov
    Collaborator

    @JKeithB Thanks for report the issue!
    This cmdlet has turned on but not implemented support for WhatIf.

  2. added a commit that references this issue on Jan 30, 2017
    2b2c4f3
  3. added a commit that references this issue on Feb 18, 2017
    e10cbff
  4. added a commit that references this issue on Aug 6, 2026
    2ae4df6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions