We are trying to log some of the Powershell commands we run on the servers during a release. I know Octopus logs them already on its database, but a customer specifically requested to have them on a file on the tentacle available at any time. So we created the following script using “start-transcript”.
Start-Transcript C:\Transcript\transcript.txt -Append
Write-Output “Hi there!”
The Octopus log shows the script ran ok and i can see the “Hi There!”. But the output back on the tentacle on “transcript.txt” is the following:
Windows PowerShell transcript start
Start time: 20140619022557
Username : OurDomainName\SYSTEM
Machine : AwsomeComputerName (Microsoft Windows NT 6.1.7601 Service Pack 1)
Windows PowerShell transcript end
End time: 20140619022557
We can see that Start and End messages the Transcript cmdlets created. But the code in the middle is not being captured.
This works just fine when manually running the scripts on the server.