Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@ghost

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.