# 1. Define your Synology NAS IP address or network name (e.g., \\SynologyNAS\)
$NasServer = "192.168.1.100" # Replace with your actual Synology IP or hostname
# 2. Define source and destination using UNC network paths instead of N:
$SourcePath = "\\$NasServer\MyDocsCopy\*"
$Timestamp = Get-Date -Format "yyyy-MM-dd"
$DestinationZip = "\\$NasServer\MyDocsArchives\MyDocsArchive_$Timestamp.zip"
# 3. Create the ZIP archive directly on the network share
Compress-Archive -Path $SourcePath -DestinationPath $DestinationZip -Force