DSCResources/DSC_CertificateImport/en-US/about_CertificateImport.help.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
.NAME
CertificateImport .DESCRIPTION The resource is used to import a certificate into a Windows certificate store. .PARAMETER Thumbprint Key - String The thumbprint (unique identifier) of the certificate you're importing. .PARAMETER Path Write - String The path to the CER file you want to import. .PARAMETER Content Write - String The base64 encoded content of the CER file you want to import. .PARAMETER Location Key - String Allowed values: LocalMachine, CurrentUser The Windows Certificate Store Location to import the certificate to. .PARAMETER Store Key - String The Windows Certificate Store Name to import the certificate to. .PARAMETER Ensure Write - String Allowed values: Present, Absent Specifies whether the certificate should be present or absent. .PARAMETER FriendlyName Write - String The friendly name of the certificate to set in the Windows Certificate Store. .EXAMPLE 1 Import public key certificate into Trusted Root store. Configuration CertificateImport_MinimalUsage_Config { Import-DscResource -ModuleName CertificateDsc Node localhost { CertificateImport MyTrustedRoot { Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070d' Location = 'LocalMachine' Store = 'Root' Path = '\\Server\Share\Certificates\MyTrustedRoot.cer' } } } .EXAMPLE 2 Import public key certificate into Trusted Root store and set the Fiendly Name to 'Contoso Root CA'. Configuration CertificateImport_FriendlyName_Config { Import-DscResource -ModuleName CertificateDsc Node localhost { CertificateImport MyTrustedRoot { Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070d' Location = 'LocalMachine' Store = 'Root' Path = '\\Server\Share\Certificates\MyTrustedRoot.cer' FriendlyName = 'Contoso Root CA' } } } .EXAMPLE 3 Import public key certificate into Trusted Root store from a provided base64 encoded string. Configuration CertificateImport_WithContent_Config { Import-DscResource -ModuleName CertificateDsc <# Create mock base64 value example for converting an existing file: $contentBase64 = [Convert]::ToBase64String([IO.File]::ReadAllBytes($certificateFilePath)) #> $contentBase64 = [System.Convert]::ToBase64String(@(00, 00, 00)) Node localhost { CertificateImport MyTrustedRoot { Thumbprint = 'c81b94933420221a7ac004a90242d8b1d3e5070d' Location = 'LocalMachine' Store = 'Root' Content = $contentBase64 } } } |