We help IT Professionals succeed at work.

Powershell HELL!!!!

317 Views
Last Modified: 2016-02-11
I need a PowerShell script which will check for a piece of software on a list of PCs. Below is the software I am looking for, and the attached file is the PC names. Can anyone tell or guide me how PowerShell would read the file and then search each PC for the Avaya software and return a true or false value from the result??? Thanks, Experts. I am a newb when it comes to Powershell.


Avaya Proactive Contact Agent 5.1.1      
Avaya Inc      5.1.1      
{B03905EA-512D-42A5-A63B-C9A6D0F3C21A}
PCID.csv
Comment
Watch Question

Technical Lead - Active Directory
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I ran the script (search-adcomps-avaya.ps1) and for some of the PCs output this in red:

Searching Computer:  pc2171
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At search-adcomps-avaya.ps1:16 char:20
+   $InstalledApps = Get-WmiObject -Class Win32reg_AddRemovePrograms -ComputerName ...
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand


What does that mean? PC is unavailable???
Dan McFaddenTechnical Lead - Active Directory
CERTIFIED EXPERT

Commented:
It means that the PC is not on the network.  What happens if you ping "pc171" ?

Dan

Author

Commented:
Ping request could not find host pc2171. Please check the name and try again.

Author

Commented:
Thanks Mr McFadden
CERTIFIED EXPERT
Top Expert 2014

Commented:
A quick note - the Win32reg_AddRemovePrograms class is only available if you've installed the SMS or SCCM agent.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.