Closed gbica-hzo closed 1 year ago
I am not certain where the function function Write-Log($message) #Log script messages to temp directory
function Write-Log($message) #Log script messages to temp directory
or specifically this line Out-File -InputObject $LogMessage -FilePath "$Env:Temp\$Log" -Append -Encoding utf8
Out-File -InputObject $LogMessage -FilePath "$Env:Temp\$Log" -Append -Encoding utf8
outputs the log files. I suspect it puts them in C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp
C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp
if the process is running under the SYSTEM account per https://octopus.com/blog/temp-different-values-for-windows-service
PS: C:\WINDOWS\system32\config\ is locked by Windows on Win11 and probably Win10, not something that we can pull logs from easily.
Seems like the path is C:\Windows\Temp
I am not certain where the function
function Write-Log($message) #Log script messages to temp directory
or specifically this line
Out-File -InputObject $LogMessage -FilePath "$Env:Temp\$Log" -Append -Encoding utf8
outputs the log files. I suspect it puts them in
C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp
if the process is running under the SYSTEM account per https://octopus.com/blog/temp-different-values-for-windows-service