Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

Stars 100
Forks 7
Total downloads 712,347
Release ImagePlayground-PowerShellModule.v3.2.7
Language: C# Updated: 2026-08-25

API Reference

Command

New-ImageQRCodeOtp

Namespace ImagePlayground
Inputs
System.String

Generates a QR code for one-time-password configuration.

Remarks

Use this cmdlet to create QR codes for authenticator apps that support TOTP or HOTP provisioning.

Examples

Authored help example

Create a TOTP QR code

PS>


New-ImageQRCodeOtp -Type Totp -SecretBase32 'JBSWY3DPEHPK3PXP' -Label 'john.doe@evotec.pl' -Issuer 'Evotec' -FilePath otp.png
        

Creates a QR code that can be scanned into a typical authenticator app for time-based MFA.

Create an HOTP QR code with a custom counter

PS>


New-ImageQRCodeOtp -Type Hotp -SecretBase32 'JBSWY3DPEHPK3PXP' -Label 'lab-token' -Issuer 'Evotec Lab' -Counter 10 -Digits 8 -Algorithm Sha256 -FilePath hotp.png
        

Creates a counter-based OTP payload for systems that use event-driven one-time passwords.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-ImageQRCodeOtp [-Algorithm <Sha1|Sha256|Sha512>] [-BackgroundColor <Color>] [-Counter <Int32>] [-Digits <Int32>] -FilePath <String> [-ForegroundColor <Color>] [-Issuer <String>] [-Label <String>] [-Period <Int32>] [-PixelSize <Int32>] -SecretBase32 <String> [-Show] -Type <Totp|Hotp> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Algorithm OtpAlgorithm optionalposition: namedpipeline: Falsevalues: 3
Hash algorithm.
Possible values: Sha1, Sha256, Sha512
BackgroundColor Color optionalposition: namedpipeline: False
Background color of the QR code.
Counter Int32 optionalposition: namedpipeline: False
Counter for HOTP.
Digits Int32 optionalposition: namedpipeline: False
Number of digits.
FilePath String requiredposition: 4pipeline: True (ByValue)
The image format is inferred from the file extension.
ForegroundColor Color optionalposition: namedpipeline: False
Foreground color of QR modules.
Issuer String optionalposition: 3pipeline: False
Issuer name.
Label String optionalposition: 2pipeline: False
Account label.
Period Int32 optionalposition: namedpipeline: False
Period for TOTP.
PixelSize Int32 optionalposition: namedpipeline: False
Pixel size for each QR module.
SecretBase32 String requiredposition: 1pipeline: False
Base32-encoded secret.
Show SwitchParameter optionalposition: namedpipeline: False
Opens the image after creation.
Type OtpAuthType requiredposition: 0pipeline: Falsevalues: 2
OTP type.
Possible values: Totp, Hotp