I'm having issues with running executing Yara with Powershell on domain computers.
Transfer Yara to computer:
PS> copy yara.exe \\PC1-PC.mydomain.com\C$\TEMP\yara.exe
Transfer rules:
PS> copy rules.yara \\PC1-PC\C$\TEMP\rules.yara
Execute scan using Invoke-Command:
PS> Invoke-Command -ComputerName PC1-PC -ScriptBlock { c:\TEMP\yara.exe c:\TEMP\rules.yara c:\TEMP\ } -credential USER
Now it transfer the Yara exe and rules to the remote computer. When executing with the invoke command, nothing returns, it just returns back to the original prompt in Powershell (ver 2.0)
The Yara rule works completely fine on standalone and does return an alert on a standalone computer. However, nothing returns when I'm using this on a remote computer that is on the domain.