diff --git a/backupBitwarden.ps1 b/backupBitwarden.ps1 index 4b6dd1d..1233cc8 100644 --- a/backupBitwarden.ps1 +++ b/backupBitwarden.ps1 @@ -22,10 +22,10 @@ bw export $password --output "$PSScriptRoot\Bitwarden User $username Export $dat 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)) +$organizations = $(convertfrom-json $(bw list organizations --session $sessionKey)) Write-Host "Found $(($organizations | measure).count) Organiztaions." -# (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 } } -# bw get attachment $attachmentID --itemid $itemID --output $file \ No newline at end of file +# (convertfrom-json $(bw list items --session $sessionKey)) | where attachments +# $itemsWithAttachments | % { $folder=$_.name; $itemID=$_.id; $_.attachments | % { bw get attachment $_.id --itemid $itemID --output "C:\Users\jgaunt\3D Objects\Bitwarden\$folder\$_.fileName" --session $sessionKey; sleep -Milliseconds 500 } } +# bw get attachment $attachmentID --itemid $itemID --output $file --session $sessionKey \ No newline at end of file