I have the next code, but when i use the arguments, it doesn't work like I try to find all the txt files in one drive:
Invoke-Command -ComputerName $param3 -Credential $cred -ArgumentList $param4,$param5,$param6,$param7 -ScriptBlock {$A = Get-ChildItem $args[0] -Recurse | Where-Object {$_.name -match ".*$args[1].*"} | Format-Table Name, CreationTime, Length, FullName -auto***'
*The variable $param5
has the text ".txt"