From 4c4037ba52a98fe96841bc80130b48bc8f5341c3 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 23 Nov 2021 15:04:27 -0500 Subject: [PATCH] added some output for user --- backupBitwarden.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backupBitwarden.ps1 b/backupBitwarden.ps1 index 8f5e029..4b6dd1d 100644 --- a/backupBitwarden.ps1 +++ b/backupBitwarden.ps1 @@ -17,13 +17,14 @@ if ($sessionKey -eq $null) { } #convertfrom-json $(bw list organizations --session $sessionKey) - +Write-Host "Exporting vault to both CSV and JSON files." bw export $password --output "$PSScriptRoot\Bitwarden User $username Export $dateTime.csv" --format csv --session $sessionKey bw export $password --output "$PSScriptRoot\Bitwarden User $username Export $dateTime.json" --format json --session $sessionKey +Write-Host "Looking for Organizations..." $organizations = $(convertfrom-json $(bw list organizations)) +Write-Host "Found $(($organizations | measure).count) Organiztaions." -# I shouldn't need portwarden anymore since I will just use bw and loop through the items with attachments # (convertfrom-json $(bw list items)) | where attachments # $itemsWithAttachments | % { $folder=$_.name; $itemID=$_.id; $_.attachments | % { bw get attachment $_.id --itemid $itemID --output "C:\Users\jgaunt\3D Objects\Bitwarden\$folder\$_.fileName"; sleep -Milliseconds 500 } }