title: How to use a TimeStamp in a file name using PowerShell in a docker container?
body: <p>I have a PowerShell script that receives live log data and writes it into a file which contains a timestamp in the filename. Locally my script is running fine but when I run it in a docker container I get the following error message:</p>
  <pre><code>Out-File: /app/myscript.ps1:13
  
  Could not find a part of the path
       | '/app/myapp-logs/live-logfile-10/05/2022-14/12.txt'. 
  </code></pre>
  <p>Here the relevant line of my code:</p>
  <p><code>cf logs myapp &gt; &quot;.\myapp-logs\live-logfile-$(Get-Date -Format &quot;dd/MM/yyyy-HH/mm&quot;).txt&quot;  </code></p>
  <p>I'm using the latest ubuntu base image and the Powershell Version: 7.2.3-1.deb.</p>