6 lines
505 B
PowerShell
6 lines
505 B
PowerShell
#Requires -Version 5.1
|
|
param([Parameter(Mandatory)][string]$Config)
|
|
$ErrorActionPreference='Stop';Import-Module (Join-Path $PSScriptRoot 'src/Wind.Lock.psm1')
|
|
$cfg=Get-Content -LiteralPath $Config -Raw|ConvertFrom-Json;if($cfg.Schema-ne 1){throw 'Invalid lock configuration.'}
|
|
$report=Join-Path $PSScriptRoot ('last-event-'+(Get-Date -Format 'yyyyMMdd-HHmmss')+'.json');Invoke-WindLockEvent -VeraCryptVolume @($cfg.VeraCryptVolume) -VeraCryptPath ([string]$cfg.VeraCryptPath) -ReportPath $report|Out-Null
|