![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #11 (permalink) | ||||||||||||
| Guest | Re: "@Echo" behavior in PS scripts @Echo is NOT Echo (just result of cmd, ehm, "naming" conventions). @Echo is modifying command-echoying on and off. It means whether commands (not their output) should be displayed or not. What it means is whenever Prompt function is executed, it will show you not ONLY output from that prompt, but also prompt itself. Without command-echoying functionality, you can't easily implement full debug log, because you only see results, but you don't see which command was executed. Martin "sapienscripter" <guest@xxxxxx-email.com> wrote in message news:41c3488b270408246c1a8a1949a2d6c2@xxxxxx-gateway.com...
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #12 (permalink) |
| Scripting Guru ![]() Rep Power: 8 ![]() ![]() ![]() | Re: "@Echo" behavior in PS scripts Here's one PowerShell way you could accomplish your goal, although it takes a little extra work while creating the script. Add a parameter like I do here to turn on the Verbose pipeline. By default it is turned off. But when turned on, the lines that begin with Write-Verbose will be written to the Verbose pipeline. #MyScript.ps1 param ([switch]$verbose) if ($verbose) {$VerbosePreference="Continue"} Write-Verbose "Get-Date" Get-Date Write-Verbose "Get-WmiObject win32_bios" Get-WmiObject win32_bios Write-Verbose "Get-Service -Name spooler" Get-Service -Name spooler Yes, I realize it is not as simple as turning echo on or off but this technique actually gives you more control so that you can only see the commands that you want to see. |
My System Specs![]() |
| | #13 (permalink) | ||||||||||||||||||||||||
| Guest | Re: "@Echo" behavior in PS scripts I think that what you want is set-psdebug -trace 1 That, in combination with start-transcript, should meet your needs. "Martin Zugec" wrote:
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #14 (permalink) | ||||||||||||
| Guest | Re: "@Echo" behavior in PS scripts Well, I was already thinking about it, but thats the worst case scenario ![]() First I want to find out whether it is possible or not and then I will experiment little more... Martin "sapienscripter" <guest@xxxxxx-email.com> wrote in message news:1ebfaebd5c0a1f23ac7337e3f6255f98@xxxxxx-gateway.com...
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #15 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: "@Echo" behavior in PS scripts Hi Leo, we never met (and least I am not aware of), but I love you ![]() That was exactly what I needed (and even better )Thanks a lot Martin "Leo Tohill" <LeoTohill@xxxxxx> wrote in message news:0F8EADFC-09DA-4616-9355-E908EEAA9574@xxxxxx
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #16 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: "@Echo" behavior in PS scripts You get an answer, I get a feel-good. Great exchange! "Martin Zugec" wrote:
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #17 (permalink) |
| Scripting Guru ![]() Rep Power: 8 ![]() ![]() ![]() | Re: "@Echo" behavior in PS scripts Nice suggestion. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unwanted Multiple contacts in "To","CC","BCC" of email send catago | xsailer | Vista mail | 1 | 07-26-2008 08:34 AM |
| Vista not wotking with "My Computer" or "Control Panel", "Screen Saver" | Platebanger | Vista General | 6 | 02-05-2008 08:54 AM |
| Incorrect behavior of GPO "Access this computer from the network" | HAL | Vista General | 1 | 06-04-2007 03:21 AM |
| WM5 Sync with Vista "Windows Calender", "Contacts", and "Mail" | Tony | Vista General | 1 | 02-16-2007 06:20 PM |
| "Close Lid behavior" broken | Jon Davis | Vista General | 29 | 01-02-2007 02:21 PM |