?
Solved

Get-Hotfix information on multiple machines

Posted on 2014-11-19
2
Medium Priority
?
921 Views
Last Modified: 2014-11-19
Can someone help? I need to pull the information below from a list of machines but I cant get it to work when trying multiple machines .

This works
Get-HotFix -ComputerName Server1 | select PSComputerName,InstalledOn,__PATH,Caption,HotFixID,InstalledBy | Export-Csv Data.csv -nti

If I try to pull from a list , it does not work .
gc servers.txt | Get-HotFix | select PSComputerName,InstalledOn,__PATH,Caption,HotFixID,InstalledBy | Export-Csv Data2.csv -nti

Error:
Get-HotFix : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:18
+ gc servers.txt | Get-HotFix | select PSComputerName,InstalledOn,__PATH,Caption,H ...
0
Comment
Question by:MilesLogan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 40453195
Try..
gc servers.txt |%{Get-HotFix -ComputerName $_ | select PSComputerName,InstalledOn,__PATH,Caption,HotFixID,InstalledBy} | Export-Csv Data2.csv -nti 

Open in new window

0
 
LVL 2

Author Closing Comment

by:MilesLogan
ID: 40453258
Thank you Subsun !  I will be posting another question related to this is you have a few mins.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question