I have something I have put together to scan computers on my network and look for certain chrome extensions.
It works and displays the information in the PowerShell console. But if it finds the extension in multiple user profiles on a machine it creates a giant blob of information instead of separating it into multiple lines and I would like to have this output to a txt or csv file:
$hostnamestxt = "Server with list of computers"
$computers = get-content “$hostnamestxt”
write-host Scanning........
foreach($computer in $computers){
$BetterNet = "\\$computer\c$\users\*\AppData\Local\Google\Chrome\User Data\Default\Extensions\gjknjjomckknofjidppipffbpoekiipm"
if (Test-Path $BetterNet) {
$a = Get-ChildItem $BetterNet
write-host BetterNet found on:
Write-Host " "$a
write-host
}