PowershellでThunderbirdのメールボックスをバックアップする

Thunderbirdのメールボックスをバックアップするだけのスクリプトが欲しくなったので書いてみた。
PowerShellで動きます。

$a = $env:APPDATA
$a = $a + "\Thunderbird"

$b = $env:USERPROFILE +"\Desktop"

$filename = Get-Date -Format "yyyy-MMdd-HHmmss"
$filename = "mailboxbackup_" + $filename
$filename = $b +"\"+ $filename+".zip"
$filename

Compress-Archive -Path $a -DestinationPath $filename
"終わり"

参考ページ:
http://tipstour.net/command/9075 https://cheshire-wara.com/powershell/ps-cmdlets/item-file/compress-archive/