Solved

Get-Hotfix information on multiple machines

Posted on 2014-11-19
2
624 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

Problems using Powershell and Active Directory?

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

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 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

16 Experts available now in Live!

Get 1:1 Help Now