#!/usr/bin/env pwsh # https://docs.sheetjs.com/docs/demos/net/email/pst $oldDir = Get-Location $tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-pst" if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force } New-Item -ItemType Directory -Path $tempDir | Out-Null Set-Location -Path $tempDir npm init -y Invoke-WebRequest -Uri "https://docs.sheetjs.com/pst/SheetJSPST.js" -OutFile "SheetJSPST.js" npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz pst-extractor@1.11.0 node --version node SheetJSPST.js bun --version bun SheetJSPST.js Set-Location $oldDir Remove-Item -Path $tempDir -Recurse -Force