From: Edward Delaporte Date: Fri, 7 Jun 2024 17:48:25 +0000 (-0500) Subject: Merge branch 'main' of github.com:edthedev/dotfiles X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/7f4277572ba5742f1a7fbfb3cde16a62ba03a4eb?hp=840899b36e5de592d6b3df35274619769438de3e Merge branch 'main' of github.com:edthedev/dotfiles --- diff --git a/psmodules/backup_to_smb.psm1 b/psmodules/backup_to_smb.psm1 new file mode 100644 index 0000000..926d048 --- /dev/null +++ b/psmodules/backup_to_smb.psm1 @@ -0,0 +1,12 @@ +function Backup-ToSMB { + param ( + $Path, + $SMBPath, + [PSCredential] $Credential, + $DriveLetter = 'N' + ) + New-PSDrive -Name $DriveLetter -PSProvider FileSystem -Root $SMBPath -Credential $Credential + robocopy $Path $SMBPath + +} +Export-ModuleMember -Function Backup-ToSMB \ No newline at end of file