Solved

Get-Hotfix information on multiple machines

Posted on 2014-11-19
2
616 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
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now