output of only part of the script

This topic contains 3 replies, has 2 voices, and was last updated by  Olaf Soyk 4 months, 3 weeks ago.

  • Author
    Posts
  • #67468

    Arik Cher
    Participant

    Hi all

    I have this:

    (dir D:\WS\App1\bin\RL.Cservice.Core.dll).VersionInfo | select @{N='App1';E={$_.FileVersion}}
    (dir D:\WS\App2\bin\RL.Cservice.Core.dll).VersionInfo | select @{N='App2';E={$_.FileVersion}}

    The problem is that when I run it , I get only reply on the fist line
    (
    App1
    ———–
    1.2.34.0
    )

    I need to be able to get answer for each line (there are more than these 2 in total)
    (something like
    App1
    ———–
    1.2.34.0

    App2
    ———–
    1.2.34.0
    )

    so I will be able to export it as report in HTML/txt or different type.

  • #67480

    Olaf Soyk
    Participant

    You really should start to learn the basics of Powershell. You could do something like this:

    Get-Item -Path "D:\WS\App*\bin\RL.Cservice.Core.dll" | Select-Object -Property Directory,BaseName,Extension,@{Name='FileVersion';Expression={$_.VersionInfo.FileVersion}}
    • #67504

      Arik Cher
      Participant

      I know the basics of Powershell and you even didn't answer the question.
      anyway , I already solved this .

    • #67521

      Olaf Soyk
      Participant

      I answered your question. Did you try the code I posted?

You must be logged in to reply to this topic.