$serverlist = ('rejk-c-app301',
               'rejk-c-dps301',
               'rejk-c-mdl301',
               'rejk-c-rep301',
               'rejk-c-sps301',
               'rejk-c-tcf301',
               'rejk-c-tcs301',
               'rejk-c-tcs302',
               'rejk-c-tcs303',
               'rejk-c-web301')

function CopyLogs($servers) { 
    foreach($server in $servers) {
        if(Test-Path "\\$server\d$\log_backup") {
            Write-Host "$server - Removing log_backup"
            Remove-Item "\\$server\d$\log_backup" -Recurse 
        }

        if(Test-Path "\\$server\d$\ifsbosystem\log") {
            Write-Host "$server - Copying log to log_backup"
            Copy-Item "\\$server\d$\ifsbosystem\log" "\\$server\d$\log_backup" -Recurse
        }
    }
}

# run me:
# CopyLogs -servers $serverlist





function RestartComputers($servers) { 
    foreach($server in $servers) {
        Write-Host "$server - Restarting"
        Invoke-Command -ComputerName $server -ScriptBlock { Restart-Computer -Force }
    }
}

# run me:
# RestartComputers -servers $serverlist