Hi Champs,
Today I have created the PowerShell Script to create the backup of your Unicorn serialized folder. This script you can integrate with your local on server deployment or Environment setup plan.
Note: This is a PowerShell script you need save this with .ps1 extension and then you can utilize this.
Param(
[string]$environmentName
)
Add-Type -Assembly “System.IO.Compression.FileSystem”;
$sourceDir = “you have to mention your sourceDir”;
$targetDir = “you have to mention your targetDir”;
$date = (Get-Date -format “yyyyMMddTHHmmss”).ToString();
if (-Not (Test-Path $targetDir)) {
New-Item -Path $targetDir -ItemType directory
}
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourceDir, “$targetDir$environmentName$date.zip”);
Please write your note or queries in comment.
Thanks for Browning!!!