external help file | Module Name | online version | schema |
---|---|---|---|
DuoSecurity-help.xml |
DuoSecurity |
2.0.0 |
Create Hardware Token
New-DuoToken [-Type] <String> [-Serial] <String> [[-Secret] <String>] [[-Counter] <Int32>]
[[-PrivateId] <String>] [[-AesKey] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Create a new hardware token. Requires "Grant write resource" API permission.
$Secret = New-DuoTokenTotpSecret
New-DuoToken -Serial 001 -Type t6 -Secret $Secret.Hex
The type of hardware token to import. One of:
Type Description
"t6" TOTP-6 hardware token "t8" TOTP-8 hardware token "h6" HOTP-6 hardware token "h8" HOTP-8 hardware token "yk" YubiKey AES hardware token Duo-D100 tokens (type "d1") are imported when purchased from Duo and may not be created via the Admin API.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The serial number of the token (maximum length 128 characters).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The TOTP/HOTP secret. This parameter is required for TOTP-6, TOTP-8, HOTP-6 and HOTP-8 hardware tokens.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Initial value for the HOTP counter. This parameter is only valid for TOTP-6, TOTP-8, HOTP-6 and HOTP-8 hardware tokens. Default: 0.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
The 12-character YubiKey private ID. This parameter is required for YubiKey hardware tokens.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The 32-character YubiKey AES key. This parameter is required for YubiKey hardware tokens.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
See New-DuoTokenTotpSecret for more info about generating TOTP secrets