New-AzVpnClientRevokedCertificate
建立新的 VPN 用戶端撤銷憑證。
語法
New-AzVpnClientRevokedCertificate
-Name <String>
-Thumbprint <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
New-AzVpnClientRevokedCertificate Cmdlet 會建立新的虛擬專用網 (VPN) 客戶端撤銷憑證,以在虛擬網路網關上使用。
用戶端撤銷憑證可防止客戶端計算機使用指定的憑證進行驗證。
此 Cmdlet 會建立未指派給虛擬閘道的獨立憑證。
相反地,New-AzVpnClientRevokedCertificate 所建立的憑證會在建立新網關時搭配 New-AzVirtualNetworkGateway Cmdlet 使用。
例如,假設您建立新的憑證,並將其儲存在名為 $Certificate 的變數中。
接著,您可以在建立新的虛擬網關時使用該憑證物件。
例如
New-AzVirtualNetworkGateway -Name "ContosoVirtualGateway" -ResourceGroupName "ContosoResourceGroup" -Location "West US" -GatewayType "VPN" -IpConfigurations $Ipconfig -VPNType "RouteBased" -VpnClientRevokedCertificates $Certificate
如需詳細資訊,請參閱 New-AzVirtualNetworkGateway Cmdlet 的檔。
範例
範例 1:建立新的用戶端撤銷憑證
$Certificate = New-AzVpnClientRevokedCertificate -Name "ContosoClientRevokedCertificate" -Thumbprint "E3A38EBA60CAA1C162785A2E1C44A15AD450199C3"
此命令會建立新的客戶端撤銷的憑證,並將憑證物件儲存在名為 $Certificate的變數中。 然後,New-AzVirtualNetworkGateway Cmdlet 可以使用此變數,將憑證新增至新的虛擬網路網關。
參數
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
指定新客戶端撤銷憑證的唯一名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Thumbprint
指定要新增之憑證的唯一標識符。
您可以使用類似下列的 Windows PowerShell 命令,傳回憑證的指紋資訊:
Get-ChildItem -Path Cert:\LocalMachine\Root
上述命令會傳回在跟證書存儲中找到之所有本機計算機憑證的資訊。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
None