Guys,
I am stuck on what i think is a simple issue \ mistake. I have make this Powershell code that i need to connect to machines in the Computers.txt file and then filter out all applications apart from an app called Mimecast. I need the output to show the computer name and what version of the application is installed. In the Select-object if i remove $_ then the script runs and only returns the version number.
gc S:\computers.txt | ForEach-Object {Get-WmiObject -Class win32_product -Impersonation 3 -computername $_ -Filter "Name LIKE '%Mimecast%'" | Select-Object $_ , Version }
Can anyone show me the error of my way?
Thanks in advance