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

powershell find text and sort output

$
0
0

Hello,

I'm trying to find some text and sort the output. The problem is that I can't find a way to output only what is need it. This is the command line.

Get-WindowsImage -ImagePath e:\sources\install.wim | select-string -simplematch -pattern "Description" | format-table line

Normally I get something like this:

Index           :1

Name           :Windows 8.1 Pro

Description  :Windows 8.1 Pro

Size             :

Index          :2

Name:         :Windows 8.1

...............

What I want is to display only

1.Windows 8.1 Pro

2.WIndows 8.1

How can I accomplish that? Thank you.


Viewing all articles
Browse latest Browse all 21975

Trending Articles