Solved

Get-Hotfix information on multiple machines

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
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 tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

830 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