I'm writing a function to collect logs for analysis. 

I'm trying to use variables to keep it as tight as possible, but for some reason the function won't create, moans about brackets and variables. 

Any assistance would be appreciated.

```
FUNCTION GetLogs ($CompName)
{
$LOGS    = "CcmExec.log,Scheduler.log,WUAHandler.log"
$CCMPath = "C$\Windows\CCM\Logs"
$Target  = "C:\Temp\Logs"

foreach (file$ IN $LOGS ) {file$ = Copy-Item \\$CompName\$CCMPath\$LOGS $Target\$CompName-$LOGS}    
}

```