Get-WindowsFeature hyper-v or other feature - I would like to ADD the name from the computer to the result


hello,

script shows result of servers have hyper-v feature installed , ignore others servers don't have it, problem that, when .txt file don't know servers have rule installed. goal add server name result.

$hypervhost = get-content "c:\hyper-vservers.txt"

 foreach ($hyper in $hypervhost) {get-windowsfeature hyper-v -computername $hyper -erroraction silentlycontinue } 

display name                                            name                       install state
------------                                            ----                       -------------
[x] hyper-v                                             hyper-v                        installed
[x] hyper-v                                             hyper-v                        installed
[x] hyper-v                                             hyper-v                        installed
[x] hyper-v                                             hyper-v                        installed

thanks,

mn


have tried using proper csv input file , call pipeline computer name $_ 

regards

roushan



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file