Functions/Backup-NAS01.ps1
function Backup-NAS01 { [CmdletBinding()] param ( [Parameter()] [string] $DriveLetter = "M" ) $Source = "M:" $Destination = "D:\NAS01Backup" if($env:COMPUTERNAME -ne "ZOLDER") { break } if(!(Test-Path $Source)) { break } if(!(Test-Path $Destination)) { New-Item $Destination -ItemType Directory } robocopy $Source $Destination /MIR /W:1 /R:1 /NFL } |