none
How to get the return information of PowerShell RRS feed

  • Question

  • I want to get the return information of PowerShell in Win32 program.

    I know that _popen () can get the return information of CMD, but " get-dedupstatus |fl " is the command of PowerShell, and  what Windows API has to get the return information of get-dedupstatus |fl from powershell

    • Moved by Bill_Stewart Friday, July 27, 2018 8:20 PM Unanswerable drive-by question
    Thursday, May 17, 2018 6:53 AM

All replies

  • If you want to use the return value of get-dedupstatus for further use within Powershell you have to get rid of the | fl

    Try this:

    $returnValue = get-dedupstatus
    
    $returnValue

    Thursday, May 17, 2018 7:10 AM