Skip to content

Latest commit

 

History

History
166 lines (128 loc) · 3.34 KB

New-DuoUserBypassCodes.md

File metadata and controls

166 lines (128 loc) · 3.34 KB
external help file Module Name online version schema
DuoSecurity-help.xml
DuoSecurity
2.0.0

New-DuoUserBypassCodes

SYNOPSIS

Create Bypass Codes for User

SYNTAX

Count (Default)

New-DuoUserBypassCodes -UserId <String> [-Count <Int32>] [-ReuseCount <Int32>] [-ValidSecs <Int32>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

Codes

New-DuoUserBypassCodes -UserId <String> [-Codes <String[]>] [-ReuseCount <Int32>] [-ValidSecs <Int32>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Clear all existing bypass codes for the user with ID user_id and return a list of count newly generated bypass codes, or specify codes that expire after valid_secs seconds, or reuse_count uses. Requires "Grant write resource" API permission.

Object limits: 100 bypass codes per user.

EXAMPLES

EXAMPLE 1

New-DuoUserBypassCodes -UserId SOMEUSERID -Count 1 -ValidSecs 30

PARAMETERS

-UserId

The ID of the User

Type: String
Parameter Sets: (All)
Aliases: user_id

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Count

Number of new bypass codes to create. At most 10 codes (the default) can be created at a time. Codes will be generated randomly.

Type: Int32
Parameter Sets: Count
Aliases:

Required: False
Position: Named
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False

-Codes

CSV string of codes to use. Mutually exclusive with count.

Type: String[]
Parameter Sets: Codes
Aliases:

Required: False
Position: Named
Default value: @()
Accept pipeline input: False
Accept wildcard characters: False

-ReuseCount

The number of times generated bypass codes can be used. If 0, the codes will have an infinite reuse_count. Default: 1

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False

-ValidSecs

The number of seconds for which generated bypass codes remain valid. If 0 (the default) the codes will never expire.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

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

-Confirm

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

https://duo.com/docs/adminapi#create-bypass-codes-for-user