API Reference
Command
New-ImageQRCodeOtp
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
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 SetsParameters
- Algorithm OtpAlgorithm
- Hash algorithm.
- Possible values:
Sha1,Sha256,Sha512 - BackgroundColor Color
- Background color of the QR code.
- Counter Int32
- Counter for HOTP.
- Digits Int32
- Number of digits.
- FilePath String
- The image format is inferred from the file extension.
- ForegroundColor Color
- Foreground color of QR modules.
- Issuer String
- Issuer name.
- Label String
- Account label.
- Period Int32
- Period for TOTP.
- PixelSize Int32
- Pixel size for each QR module.
- SecretBase32 String
- Base32-encoded secret.
- Show SwitchParameter
- Opens the image after creation.
- Type OtpAuthType
- OTP type.
- Possible values:
Totp,Hotp