$password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $password)

Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
    Write-Host "=== Recent Sync Activity ===" -ForegroundColor Cyan
    Write-Host ""
    
    Get-Content "C:\Shares\test\scripts\sync-from-nas.log" -Tail 50 | Where-Object {
        $_ -match "\.BAT|Sync complete|Starting sync|pushed"
    } | ForEach-Object {
        if ($_ -match "\.BAT") {
            Write-Host $_ -ForegroundColor Green
        } else {
            Write-Host $_ -ForegroundColor Cyan
        }
    }
}
