Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LabtechConsulting/LabTech-Powershell-Module/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Decodes strings that LabTech stores encoded in the registry (such as the server password, proxy username, and proxy password). The function uses Triple-DES decryption with an MD5-hashed key. If decoding with the supplied key fails and -Force is set (the default), alternate default keys are tried automatically.

Syntax

ConvertFrom-LTSecurity [-InputString] <string[]> [-Key <string[]>] [-Force] [<CommonParameters>]

Parameters

InputString
string[]
required
The Base64-encoded string to decode. Accepts an array of strings.
  • Position: 1
  • Pipeline input: accepted by value and by property name
Key
string[]
The decryption key. If not provided (or if $null is passed), the module’s built-in default key is used. Supply an array to try multiple keys in order.
  • Pipeline input: accepted by property name
Force
switch
default:"true"
When set, the function retries decoding with alternate default keys if the provided key fails. Defaults to $True. Pass -Force:$False to suppress fallback attempts.

Return value

Returns a string[] containing the decoded value for each input string, in the same order. Returns $null if no key succeeds for a given input.

Examples

Decode a single encoded string:
ConvertFrom-LTSecurity -InputString 'encodedstring=='
Decode the server password from agent service info via the pipeline:
Get-LTServiceInfo | Select-Object -Expand 'ServerPassword' | ConvertFrom-LTSecurity
Decode using a specific key without falling back to defaults:
ConvertFrom-LTSecurity -InputString 'encodedstring==' -Key 'MyCustomKey' -Force:$False