title: Customizing PowerShell Commands Logs in Separate File
body: <p>I am recording powershell commands of every process via registry.</p>
  <blockquote>
  <p>HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription
  → EnableTranscripting = 1</p>
  </blockquote>
  <blockquote>
  <p>HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription
  → EnableInvocationHeader = 1</p>
  </blockquote>
  <blockquote>
  <p>HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription
  → OutputDirectory = &quot;&quot; (Enter path. Empty = default)</p>
  </blockquote>
  <p>The output of this registry is as follows:<a href="https://i.stack.imgur.com/Y0wXU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y0wXU.png" alt="enter image description here" /></a></p>
  <p>It creates a new file for every powershell process. These file includes Process ID  along with other details. Is there is anyway to add the process ID along with the txt file name.??</p>
  <p>Like <em>PowerShell_transcript.ADMIN-PC.Dc3e2zQo.20201001075256-<strong>ProcessID</strong></em>
  So that it is easily differentiable within multiple powershell processes log files.</p>