(how to backup files with powershell using compress-archive)
*compress-archive
*how to backup files with powershell
In this video i show you how you can use compress-archive to create a nice powershell backup script/function
Code :
param(
[Parameter(Mandatory=$true)] [string] $folder
#[Parameter(Mandatory)] [string] $zipfile
)
#we need to do some magic to get the date for instance.
$date = get-date -f "yyyy-MM-dd__hh-mm-ss"
$zipfile = $folder + "-$date.zip"
Compress-Archive -Path $folder -DestinationPath $zipfile
Смотрите видео PowerShell - Compress-Archive онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Mr Automation 09 Сентябрь 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 955 раз и оно понравилось 9 посетителям.