Please feel free to provide feedback or file bugs here.

Add-Content should create folder but returns error

According to this documentation Add-Content should create a folder when it does not exist: "This command creates a new directory and file and copies the content of an existing file to the newly created file."

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-content?view=powershell-5.1

However, I get an error: "Add-Content : Could not find a part of the path 'C:\tests\test134\logs\test134.log'."

Seems like a clear issue to me. Either in the documentation or the functionality.

BR Matthias

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Matthias shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base