Avatar of Leon_Kowalskii
Leon_Kowalskii asked on

Powershell HELL!!!!

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
PowershellShell ScriptingActive DirectoryWindows OS

Avatar of undefined
Last Comment
footech

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dan McFadden

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Leon_Kowalskii

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 McFadden

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

Dan
ASKER
Leon_Kowalskii

Ping request could not find host pc2171. Please check the name and try again.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER
Leon_Kowalskii

Thanks Mr McFadden
footech

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