Skip to content

Commit 4f6d709

Browse files
authored
Merge pull request #1 from fencepost/fencepost-if-args-order-swap
Swap 'if' args so wildcard is after -like to allow matching
2 parents 83426e1 + acccdb2 commit 4f6d709

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RemoteControlAgentSearch.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Foreach ($process in $processes){
3131
Foreach($product in $products){
3232
$bins = $product.Executables -Split ','
3333
foreach($bin in $bins){
34-
if($bin -like $process.Name){
34+
if($process.Name -like $bin){
3535
$return += New-Object psobject -Property ([ordered]@{Message="Found possible remote control application.";
3636
Product=$product.Software;
3737
ProcessName=$process.Name;

0 commit comments

Comments
 (0)