# Invoke-RASExportCertificate

## NAME

Invoke-RASExportCertificate

## SYNOPSIS

Exports a certificate to a file.

## SYNTAX

**Invoke-RASExportCertificate** \[\[-[Id](#id-string)] *(uint)*] \[[FilePath](#filepath-string) *(string)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Invoke-RASExportCertificate** \[-[InputObject](#inputobject)] *(*[*Certificate*](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/types/certificate)*)* \[[FilePath](#filepath-string) *(string)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

**Invoke-RASExportCertificate** \[\[-[Name](#name-string)] *(string)*] \[\[-[SiteId](#siteid-string)] *(uint)*] \[[FilePath](#filepath-string) *(string)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

Exports a certificate to a file.

## PARAMETERS

## Name (string)

The name of the Certificate to export.

```
        Required?                    false

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID of the Certificate to export.

```
        Required?                    false

        Position?                    1

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Id (uint)

The ID of the Certificate to export.

```
        Required?                    false

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## InputObject ([Certificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/types/certificate))

The Certificate object to export.

To obtain a Certificate object representing a Certificate, use the Get-RASCertificate command."

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        Accept wildcard characters?  false
```

## FilePath (string)

Target file name and path. Use the '.crt' filename extension to be consistent with Parallels RAS console.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

(CommonParameters)

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

[Certificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/types/certificate)

## OUTPUTS

[RASFiles](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/types/rasfiles)

## EXAMPLES

**---------- EXAMPLE 1 ----------**

Invoke-RASExportCertificate -Name MyCertificate -FilePath "C:\myCertificate.crt"

Exports the certifcate named MyCertificate to the specified file.\
\&#xNAN;**---------- EXAMPLE 2 ----------**

Invoke-RASExportCertificate -Id 1 -FilePath "C:\myCertificate.crt"

Exports the certifcate with Id 1 to the specified file.

## RELATED LINKS

* [Get-RASCertificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/commands/get-rascertificate)
* [New-RASCertificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/commands/new-rascertificate)
* [Set-RASCertificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/commands/set-rascertificate)
* [Remove-RASCertificate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/commands/remove-rascertificate)
* [Invoke-RASCertificateCmd](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/commands/invoke-rascertificatecmd)
