Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As a developer, I can tell you I no longer have a bunch of ConsoleApplication42 projects laying around in a folder.</p> <p>As a developer at a small company where I pretty much do all things IT (DBA, manipulate routers, pull call detail records from the switch, monitor and graph bandwidth for customers, etc...) I can tell you that PowerShell fills a sorely needed gap in Windows and the fact that it's built on .NET provides a seamless upgrade path when the PowerShell pipeline is too slow to handle millions of iterations or a more permanent, strongly typed implementation is needed.</p> <p>Anyway, I guess the question is why are you switching to PowerShell if you don't have a pressing need? I mean it's good to learn it now since it's basically the new management interface for all things Microsoft. But if that doesn't affect you then don't bother if you don't think you're gaining anything.</p> <p><strong>EDIT (In response to comments below)</strong></p> <p>It sounds like you're trying to use the .NET Process class to launch an exe and redirect it's stdout so it can be read by the caller. I agree that is a pain in .NET but fortunately PowerShell does all this for you pretty simply. As for capturing the result and still writing it to the display, that's pretty simple too though the command isn't a very well-known one because it isn't used that often. Here's an example:</p> <pre><code># I always find it easier to use aliases for external commands Set-Alias csc C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe # Create some source file Set-Content test.cs @" class Program { static void Main() { System.Console.WriteLine("Hello World"); } } "@ # Call CSC.EXE # the output of csc.exe is written to results.txt and piped # to the host (or select-string if you prefer) csc test.cs | Tee-Object -file results.txt # Check for errors if ($LASTEXITCODE) { # this is where community extensions would come in # handy. powershell 2.0 also has a command to send # mail but in 1.0 you can grab one from poshcode.org } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload