Skip to content

Invoke-VenafiCertificateAction

SYNOPSIS

Perform an action against a certificate on TPP or VaaS

SYNTAX

Retire

Invoke-VenafiCertificateAction -CertificateID <String> [-Retire] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Reset

Invoke-VenafiCertificateAction -CertificateID <String> [-Reset] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Renew

Invoke-VenafiCertificateAction -CertificateID <String> [-Renew] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Push

Invoke-VenafiCertificateAction -CertificateID <String> [-Push] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Validate

Invoke-VenafiCertificateAction -CertificateID <String> [-Validate] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Revoke

Invoke-VenafiCertificateAction -CertificateID <String> [-Revoke] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

Delete

Invoke-VenafiCertificateAction -CertificateID <String> [-Delete] [-AdditionalParameters <Hashtable>]
 [-VenafiSession <PSObject>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

One stop shop for basic certificate actions against either TPP or VaaS. When supported by the platform, you can Retire, Reset, Renew, Push, Validate, Revoke, or Delete.

EXAMPLES

EXAMPLE 1

Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Revoke

Perform an action

EXAMPLE 2

Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Delete -Confirm:$false

Perform an action bypassing the confirmation prompt. Only applicable to revoke and delete.

EXAMPLE 3

Invoke-VenafiCertificateAction -CertificateID 'b7f1ab29-34a0-49ba-b801-cc9cd855fd24' -Revoke -Confirm:$false | Invoke-VenafiCertificateAction -Delete -Confirm:$false

Chain multiple actions together

EXAMPLE 4

Invoke-VenafiCertificateAction -CertificateID '\VED\Policy\My folder\app.mycompany.com' -Revoke -AdditionalParameters @{'Comments'='Key compromised'}

Perform an action sending additional parameters.

PARAMETERS

-CertificateID

Certificate identifier. For Venafi as a Service, this is the unique guid. For TPP, use the full path.

Type: String
Parameter Sets: (All)
Aliases: Path, id

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

-Retire

Retire/disable a certificate

Type: SwitchParameter
Parameter Sets: Retire
Aliases:

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

-Reset

Reset the state of a certificate and its associated applications. TPP only.

Type: SwitchParameter
Parameter Sets: Reset
Aliases:

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

-Renew

Requests immediate renewal for an existing certificate

Type: SwitchParameter
Parameter Sets: Renew
Aliases:

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

-Push

Provisions the same certificate and private key to one or more devices or servers. The certificate must be associated with one or more Application objects. TPP only.

Type: SwitchParameter
Parameter Sets: Push
Aliases:

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

-Validate

Initiates SSL/TLS network validation

Type: SwitchParameter
Parameter Sets: Validate
Aliases:

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

-Revoke

Sends a revocation request to the certificate CA. TPP only.

Type: SwitchParameter
Parameter Sets: Revoke
Aliases:

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

-Delete

Delete a certificate.

Type: SwitchParameter
Parameter Sets: Delete
Aliases:

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

-AdditionalParameters

Additional items specific to the action being taken, if needed. See the api documentation for appropriate items, many are in the links in this help.

Type: Hashtable
Parameter Sets: (All)
Aliases:

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

-VenafiSession

Authentication for the function. The value defaults to the script session object $VenafiSession created by New-VenafiSession. A TPP token or VaaS key can also provided. If providing a TPP token, an environment variable named TPP_SERVER must also be set.

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: $script:VenafiSession
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

CertificateID

OUTPUTS

PSCustomObject with the following properties:

CertificateID - Certificate path (TPP) or Guid (VaaS)

Success - A value of true indicates that the action was successful

Error - Indicates any errors that occurred. Not returned when Success is true

NOTES

http://VenafiPS.readthedocs.io/en/latest/functions/Invoke-TppCertificateRenewal/

https://github.com/Venafi/VenafiPS/blob/main/VenafiPS/Public/Invoke-TppCertificateRenewal.ps1

https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Certificates-Reset.php

https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Certificates-renew.php

https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Certificates-Push.php

https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Certificates-Validate.php

https://docs.venafi.com/Docs/current/TopNav/Content/SDK/WebSDK/r-SDK-POST-Certificates-revoke.php

https://api.venafi.cloud/webjars/swagger-ui/index.html?configUrl=%2Fv3%2Fapi-docs%2Fswagger-config&urls.primaryName=outagedetection-service

https://api.venafi.cloud/webjars/swagger-ui/index.html?urls.primaryName=outagedetection-service#/Certificates/certificateretirement_deleteCertificates