< Back

Get-AzureBatchCertificate

Tue Jan 29, 2019 9:35 pm

NAME Get-AzureBatchCertificate



SYNOPSIS

Gets the certificates in a Batch account.





SYNTAX

Get-AzureBatchCertificate -BatchContext <BatchAccountContext> [-DefaultProfile <IAzureContextContainer>] [-Filter <String>] [-MaxCount <Int32>]

[-Select <String>] [<CommonParameters>]



Get-AzureBatchCertificate [-ThumbprintAlgorithm] <String> [-Thumbprint] <String> -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] [-Select <String>] [<CommonParameters>]





DESCRIPTION

The Get-AzureBatchCertificate cmdlet gets the certificates in the Azure Batch account that the BatchContext parameter specifies. To obtain a

particular certificate, specify the ThumbprintAlgorithm and Thumbprint parameters. Specify the Filter parameter to get the certificates that match

an Open Data Protocol (OData) filter.





PARAMETERS

-BatchContext <BatchAccountContext>

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount

cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To

use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys

populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the

BatchAccountContext.KeyInUse property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Filter <String>

Specifies an OData filter clause. If you specify this parameter, this cmdlet gets the certificates that match the filter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MaxCount <Int32>

Specifies the maximum number of certificates to return. If you specify a value of zero (0) or less, the cmdlet does not use an upper limit.

The default value is 1000.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Select <String>

Specifies an OData select clause. Specify a value for this parameter to get specific properties rather than all object properties.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Thumbprint <String>

Specifies the thumbprint of the certificate that this cmdlet gets.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ThumbprintAlgorithm <String>

Specifies the algorithm used to derive the Thumbprint parameter. Currently, the only valid value is sha1.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

BatchAccountContext

Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline





OUTPUTS

Microsoft.Azure.Commands.Batch.Models.PSCertificate







NOTES









Example 1: Get a certificate by thumbprint



PS C:\\>Get-AzureBatchCertificate -ThumbprintAlgorithm "sha1" - Thumbprint "C1E494A415149C5F211C4778B52F2E834A07247C" -BatchContext $Context

Thumbprint : c1e494a415149c5f211c4778b52f2e834a07247c

ThumbprintAlgorithm : sha1

Url :

https://pstests.eastus.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=C1E494A415149C5F211C4778B52F2E834A07247

C)

State : Active

StateTransitionTime : 10/6/2015 6:21:16 PM

PreviousState :

PreviousStateTransitionTime :

Data :

CertificateFormat :

Password :

PublicData :

MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk

1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5

ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjS

zBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep

+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FS

SBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ

DeleteCertificateError :



This command gets a single certificate that has the specified thumbprint. The certificate thumbprint algorithm is sha1.





Example 2: Get filtered certificates



PS C:\\>Get-AzureBatchCertificate -Filter "state eq 'active'" -BatchContext $Context

Thumbprint : 025b351b087a084c5067f5e71eff8591970323f9

ThumbprintAlgorithm : sha1

Url :

https://pstests.eastus.batch.azure.com/ ... 1970323f9)

State : Active

StateTransitionTime : 10/6/2015 6:21:17 PM

PreviousState :

PreviousStateTransitionTime :

Data :

CertificateFormat :

Password :

PublicData :

MIIB9DCCAWGgAwIBAgIQy9W5y8iwhppGhtAG06dHKTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAyMB4XDTE1MTAwMjE2MjkxNFoXDTM5MTIzMTIzNTk

1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJxagvVrlnKfv6hfzSiFJUkdGkPjC3tFiKebK6IaeHzesFdFfupXUE

wT0xOWh9xwa3OVkPECEc/u1sw3iVX/J4AODiwzmOWutoVRpWjxGFpgw9+dPvXMjs/Ue7JL7ag3siHs5EcarW91qKbgtko6i/r4emaRyk60U93TrbWQAWJ9AgMBAAGjS

zBJMEcGA1UdAQRAMD6AEAdqsOpyeXF/uDe7ZGKeez+hGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMoIQy9W5y8iwhppGhtAG06dHKTAJBgUrDgMCHQUAA4GBAC0MaAem

6ByyURFvGnFZyjEepjXC5wcaGq+gguDFe8rG88ceig1ZqewdcmC1y4p05uBhbmETbYVWzJarNsHYq2LTihi4t2J4jt2YVYz/IRdUB82iaFFbJRSPrN+6xD3KM2lve5N

4OjtlZAdiXiSUYFf3I6ypberUsAdba3QQajCN

DeleteCertificateError :



Thumbprint : c1e494a415149c5f211c4778b52f2e834a07247c

ThumbprintAlgorithm : sha1

Url :

https://pstests.eastus.batch.azure.com/ ... 34a07247c)

State : Active

StateTransitionTime : 10/6/2015 6:21:16 PM

PreviousState :

PreviousStateTransitionTime :

Data :

CertificateFormat :

Password :

PublicData :

MIIB9DCCAWGgAwIBAgIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAMBYxFDASBgNVBAMTC0JhdGNoVGVzdDAxMB4XDTE1MTAwMjE2MjkwNVoXDTM5MTIzMTIzNTk

1OVowFjEUMBIGA1UEAxMLQmF0Y2hUZXN0MDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM06unpRipn3BmHBM75d0s8w/Wwifci16PoJo4c2V68GwsCCFsNOn5

ypo7BBXo1fpBjrnso5w+koaE5LjxkBSVm+TkogwbKlW6WURTM0O5viRVbPnEEU/Y01Pj5cJElFuLEk9Uoe/r/lP8b5A607t1cPjSXkwhEZEYc3LkHDSo0ZAgMBAAGjS

zBJMEcGA1UdAQRAMD6AEFRsTAsrvF+FmPuICooZXaKhGDAWMRQwEgYDVQQDEwtCYXRjaFRlc3QwMYIQpUXhwCuAPJRDhl7kY/0PdTAJBgUrDgMCHQUAA4GBALt0F8Ep

+8XVE/M2aNtxzlku72gxiOiAo1HmpUaixXx3gl8kdP3xgoKMaq4JskqdLmbJJUnCQ3wmzsdPwjswsW2ycT12zuBddaiS+id98k8U/KYc6FxMgS+H70FYOxARLn7P4FS

SBf/QCyign+BherzezdZ5NBdfzbmWxIMP5iFJ

DeleteCertificateError :



This command gets all certificates in the active state from the Batch account. The Filter parameter specifies the state.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ertificate

Get-AzureRmBatchAccountKeys

New-AzureBatchCertificate

Remove-AzureBatchCertificate

Azure Batch Cmdlets