hi Everyone,
I'm facing a problem that i've never seen before with the start-transcript cmdlet. Let me explain what is happening...
I have two Windows Server 2012 R2 Standard installed. One is for dev and the other one is for production environment. They boss have policyexecution set to Remotesign.
On my production server, i open a new powershell Windows and write :
start-transcript C:\PS1\test1.txt
write-host "hello world"
stop-transcript
Then, the transcript file output looks like this :
**********************
Windows PowerShell transcript start
Start time: ------
Username : ------
Machine : ------ (Microsoft Windows NT 6.3.9600.0)
**********************
Transcript started, output file is C:\PS1\test1.txt
PS C:\Users\Administrator.mydomain> write-host "hello world"
hello world
PS C:\Users\Administrator.mydomain> stop-transcript
**********************
Windows PowerShell transcript end
End time: ------
**********************
Which is normal. But if i put the same commands in a test2.ps1 script and launch it from the same powershell window the result is different and the output file transcript looks like this :
**********************
Windows PowerShell transcript start
Start time: ------
Username : ------
Machine : ------ (Microsoft Windows NT 6.3.9600.0)
**********************
**********************
Windows PowerShell transcript end
End time: ------
**********************
So it seems that the transcript cmdlet do not catch anything. What is unbelievable is that my dev server do not have this problem and the transcript output always have the same result in both case : showing the hello world etc.
Does anyone has never face this problem ? What is going wrong with this server ? Is there any security parameter that i have to set on my production server to make the start-transcript work normally in both case ?
Thank you for your help.