Export-TlsSessionTicketKey

Exports a TLS session ticket key.

Syntax

Default (Default)

Export-TlsSessionTicketKey
    [-ServiceAccountName] <NTAccount>
    [[-Path] <String>]
    [-Password] <SecureString>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Export-TlsSessionTicketKey cmdlet exports the administrator managed Transport Layer Security (TLS) session ticket key for a service account.

TLS creates a session ticket by using the TLS Session Resumption without Server-Side State mechanism. For more information, see New-TlsSessionTicketKey or type Get-Help New-TlsSessionTicketKey.

Examples

Example 1: Export a TLS session ticket key

$Password = Read-Host -AsSecureString
Export-TlsSessionTicketKey -Password $Password -Path 'C:\KeyConfig\TlsSessionTicketKey.config' -ServiceAccountName NetworkService

The first command prompts the user to enter a password by using the Read-Host cmdlet. The command masks the password that the user types at the prompt. For more information, type Get-Help Read-Host. The command stores the password in the $Password variable.

The second command exports the session ticket key for the service account named NetworkService from the configuration file on the TLS server. The command specifies the path for the configuration file on the TLS server, and specifies that the TLS session use the password stored in $Password to access the configuration file.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Password

Specifies the password, as a secure string, for the key.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Path

Specifies the path of the configuration file for the TLS server.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:FullName

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServiceAccountName

Specifies the name of a service account. The cmdlet exports the configuration of the TLS session ticket key for the service account. Only System, LocalService, NetworkService, and SID of virtual accounts are supported.

Parameter properties

Type:NTAccount
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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