protected override void ProcessRecord() { if (ShouldProcess(Name, Properties.Resources.AddCertificate)) { var certificateOperation = this.DataServiceClient.EnrollCertificate(VaultName, Name, CertificatePolicy == null ? null : CertificatePolicy.ToCertificatePolicy(), Tag == null ? null : Tag.ConvertToDictionary()); var kvCertificateOperation = KeyVaultCertificateOperation.FromCertificateOperation(certificateOperation); this.WriteObject(kvCertificateOperation); } }
public override void ExecuteCmdlet() { if (ShouldProcess(Name, Properties.Resources.AddCertificate)) { var certificateOperation = this.DataServiceClient.EnrollCertificate(VaultName, Name, CertificatePolicy == null ? null : CertificatePolicy.ToCertificatePolicy(), Tag == null ? null : Tag.ConvertToDictionary()); this.WriteObject(certificateOperation); } }
public override void ExecuteCmdlet() { WriteWarning("Add-AzureKeyVaultCertificate: The -CertificatePolicy parameter will become mandatory in the May 2018 release."); if (ShouldProcess(Name, Properties.Resources.AddCertificate)) { var certificateOperation = this.DataServiceClient.EnrollCertificate(VaultName, Name, CertificatePolicy == null ? null : CertificatePolicy.ToCertificatePolicy(), Tag == null ? null : Tag.ConvertToDictionary()); var kvCertificateOperation = PSKeyVaultCertificateOperation.FromCertificateOperation(certificateOperation); this.WriteObject(kvCertificateOperation); } }