Friends.
Probably a really nice easy one.
On this technet thread 'BigTeddy' wrote a wonderful little script to get a dynamic menu from a Get-Service query.
I'm doing something similar and would like to know how to list both the Name and Status in the menu.
Here's the code:
$processes = Get-Process $menu = @{} for ($i=1;$i -le $processes.count; $i++) { Write-Host "$i. $($processes[$i-1].name)" $menu.Add($i,($processes[$i-1].name)) } [int]$ans = Read-Host 'Enter selection' $selection = $menu.Item($ans) ; Get-Process $selection Is that something that can easily be achieved? I'm somewhere around a basic user for PowerShell and so can't figure out where, if anywhere, to put the .Status
Thanks