Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Conditionally writing application output to PowerShell pipeline

$
0
0

I have a C# console application that outputs text. If the application is run from a PowerShell window I would like to output objects instead of text, so the objects may be consumed by cmdlets downstream in the pipeline.

  1. How would my app detect that it is running under PowerShell?
  2. How do I output objects to the pipeline?

 -Brian


Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>