Skip to content

TestDrive:\ provided to New-Item creates folder in current working directory #2258

@jcoryatjr

Description

@jcoryatjr

Checklist

What is the issue?

When invoking the New-Item cmdlet with a path of TestDrive:\ -Force during a test, a new folder in the current working directory with the name of the guid of the TestDrive: provider is created.

Expected Behavior

Do nothing.

Steps To Reproduce

New-Item -Path TestDrive:\ -ItemType Directory -Force

Describe your environment

Pester version : 5.3.3 C:\Program Files\WindowsPowerShell\Modules\Pester\5.3.3\Pester.psm1
PowerShell version : 7.3.0
OS version : Microsoft Windows NT 10.0.19044.0

Possible Solution?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions