Cmdlets/ConvertFrom-EncryptedData.ps1
# ? TITEL ConvertFrom-EncryptedData # ? DESCRIPTION # ? TAGS UserCmdlet # ? VERSION 2019.10.19 using Module Microsoft.PowerShell.Management using Module Microsoft.PowerShell.Utility using namespace System using namespace System.Runtime.InteropServices $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop Set-StrictMode -Version Latest Function ConvertFrom-EncryptedData { <# .SYNOPSIS Verschlüsselte Daten entschlüsseln. .DESCRIPTION Long description .PARAMETER Key dfgkjdfhgkdfjghkfjh .PARAMETER TextInput .EXAMPLE .INPUTS .OUTPUTS .NOTES VERSION 2019-10-10 TAG Crypt String SecureString AUTOR a.krick@outlook.com COMMENT Zum entschlüsseln von Musterlösungen #> [CmdletBinding()] Param ( [Byte[]]$Key, [String]$TextInput ) return $TextInput | ConvertTo-SecureString -Key $Key | ForEach-Object -Process { [Marshal]::PtrToStringAuto([Marshal]::SecureStringToBSTR($_)) }; } |