Update main.ps1

This commit is contained in:
egieb
2025-06-17 10:58:19 +00:00
committed by GitHub
parent 2078f98d82
commit 9b667a0f12

View File

@@ -108,15 +108,15 @@ if (-not (Test-Path `$transcriptDir))
{
New-Item -Type Directory `$transcriptDir
}
`$dateStamp = Get-Date -Format ((Get-culture).DateTimeFormat.SortableDateTimePattern -replace ':','-')
`$dateStamp = Get-Date -Format ((Get-culture).DateTimeFormat.SortableDateTimePattern -replace ':','.')
try
{
Start-Transcript "`$transcriptDir\Transcript-`$dateStamp.txt" | Out-Null
Start-Transcript "`$transcriptDir\Transcript.`$dateStamp.txt" | Out-File -FilePath "$transcriptDir\Transcripts_Logging.txt" -Append
}
catch [System.Management.Automation.PSNotSupportedException]
{
return
}
}
"@
$scriptblock | Out-File -FilePath $Profile -Force