Skip to content

Configuration Guide

Custom Powershell


Create a PowerShell Job to run a custom PowerShell script, typically used as a follow up Job via Run follow Up CAD Jobs and Run Follow Up PDF Jobs

Creator PowerShell System Variables

  • $wsFile: - Variable contains the Vault Web Service File object
  • $vConn: Variable contains the Vault Connection
  • $jobParams: Variable contains the Job Parameters

After initial execution (without any thrown exceptions), refresh the Minute Creator Script editor to see the listing of custom MinuteView and MinuteCreator objects.

Minute Creator PowerShell Editor

Debug

To aid with script debugging, Write-Host writes content to the Jobs debug log, accessed via Minute Insights Job History or found on the Job Processor under C:\TEMP\TTGENERALLOGS.

Sample Creator PowerShell Script

The below PowerShell script can be used for Minute Creator Job PowerShell demonstration.

PS
# Example Creator Script 
# The target file in Vault will have its property "Author" updated. 

Write-Host "Example Write Host"

# Alternative methods to return the FileId
Write-Host $jobParams["FileId"]
Write-Host $jobParams.FileId

# List all cmdlets from the Tentech.VaultCreator module
Get-Command -Module Tentech.VaultCreator | ForEach-Object { Write-Host $_ }

try {
	Update-VaultFileProps -FileId  $jobParams["FileId"] -Properties @{ "Author" = "KarlH@Tentech.com.au" }
    Write-Host "Properties Updated"
}
catch {
	Write-Host "Properties failed to update"
}

Executing a Creator Job containing this script via Minute Controller Queue Jobs will result in the target file having its "Author" property updated.

The Job debug log is found under the Minute Insights Job History. The Write-Output content is logged between:

###################################### SCRIPT ######################################
...
###################################### END SCRIPT ######################################

Vault Creator Commandlets

The below commandlets are available for use within the Minute Creator Job PowerShell script.

  • Add-CaptureMarkupsToVault
  • Add-CaptureMarkupToFile
  • Add-VaultFile
  • Add-VaultFolder
  • Add-VaultJob
  • Get-VaultFile
  • Get-VaultFileProperties
  • Get-VaultFilesSearch
  • Get-VaultFoldersSearch
  • Get-VaultStateChangeVersion
  • Invoke-AutoCADConsole
  • Open-VaultConnection
  • Set-VariableView
  • Set-VaultFileRevision
  • Update-VaultFileProps
  • Update-VaultFileState

Tentech 2024