1.    22 May 2006 #1
    Andrew Watt [MVP] Guest

    How much of a session does start-transcript capture?


    I did a simple test to see whether start-transcript could help with
    the recently posted question about XCopy.

    To my surprise,

    start-transcript
    XCopy C:\NonExistent.txt C:\NotHere.txt /C
    stop-transcript

    showed the error message from XCopy on the console but didn't capture
    it in the transcript.

    Since the Help file for start-transcript states that "the entire
    session" will be copied to the transcript file that is a
    disappointment and concern.

    Is the failure to capture error information from XCopy "by design" or
    a bug?

    Thanks

    Andrew Watt MVP
    Author - Professional Windows PowerShell (Wrox)
      My System SpecsSystem Spec

  2.    22 May 2006 #2
    DBMwS Guest

    RE: How much of a session does start-transcript capture?


    I was able to see that even after redirecting error output to standard output
    Here is the transcript file
    **********************
    Windows PowerShell Transcript Start
    Start time: 20060522100203
    Username : ..
    Machine : ..
    **********************
    Transcript started, output file is ./test.txt
    [^_^]PS[217]>XCopy C:\NonExistent.txt C:\NotHere.txt /C 2>&1
    XCOPY.EXE : File not found - NonExistent.txt
    At line:1 char:6
    + XCopy <<<< C:\NonExistent.txt C:\NotHere.txt /C 2>&1
    [^_^]PS[218]>Stop-Transcript
    **********************
    Windows PowerShell Transcript End
    End time: 20060522100235
    **********************

    But below is what i really typed.
    [^_^]PS[216]>Start-Transcript ./test.txt
    Transcript started, output file is ./test.txt
    [^_^]PS[217]>XCopy C:\NonExistent.txt C:\NotHere.txt /C 2>&1
    0 File(s) copied
    XCOPY.EXE : File not found - NonExistent.txt
    At line:1 char:6
    + XCopy <<<< C:\NonExistent.txt C:\NotHere.txt /C 2>&1
    [^_^]PS[218]>Stop-Transcript
    Transcript stopped, output file is C:\programming\ps\transcripts\test.txt
    [^_^]PS[219]>ii test.txt


    Apparently, "0 File(s) copied" is not displayed in transcript file "test.txt".


    "Andrew Watt [MVP]" wrote:

    > I did a simple test to see whether start-transcript could help with
    > the recently posted question about XCopy.
    >
    > To my surprise,
    >
    > start-transcript
    > XCopy C:\NonExistent.txt C:\NotHere.txt /C
    > stop-transcript
    >
    > showed the error message from XCopy on the console but didn't capture
    > it in the transcript.
    >
    > Since the Help file for start-transcript states that "the entire
    > session" will be copied to the transcript file that is a
    > disappointment and concern.
    >
    > Is the failure to capture error information from XCopy "by design" or
    > a bug?
    >
    > Thanks
    >
    > Andrew Watt MVP
    > Author - Professional Windows PowerShell (Wrox)
    >

      My System SpecsSystem Spec


Similar Threads
Thread Forum
Start-Transcript in Userprofile\My Documents
Hi, I'm trying to save all my Powershell Transcripts to a sub-folder of My Documents like c:\Documents and Settings\myname\My Documents...
PowerShell
RE: Possible to see status of Start-Job task from another session?
No - you can't see the jobs in one PowerShell session from another -- Richard Siddaway All scripts are supplied "as is" and with no warranty...
PowerShell
How to detect session start and stop?
My program needs to do X when someone 'starts using' their Windows user account, and it should do Y when they 'stop using' their Windows user...
.NET General
[CTP2] Start-Transcript bug reminder
It has been reported before but the bug still exist. Start-Transcript doesn't record legacy application output (e.g. ipconfig) --- Shay Levi...
PowerShell
start-transcript
Can I use it in my custom PSHost?
PowerShell
Don't start session out of domain
I add the machine to a domain and wonk fine, but when start session out of a domain appear the message "There is no start session server..........."...
Vista networking & sharing
Start-Transcript and output from legacy applications
Is it just me or does the PowerShell transcript only capture output from the PowerShell output cmdlets? I have a transcript started and ran...
PowerShell

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 14:24.
    .