Gets an X509CertificateStore
object for the given location and store name.
Get-CertificateStore [-StoreLocation] {CurrentUser | LocalMachine} [-StoreName] {AddressBook | AuthRoot | CertificateAuthority | Disallowed | My | Root | TrustedPeople | TrustedPublisher} [<CommonParameters>]
Returns an X509Store
for a given store location and store name. The store must exist. Before being retured, it is opened for writing. If you don't have permission to write to the store, you'll get an error.
If you just want to read a store, we recommend using PowerShell's cert:
drive.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
StoreLocation | StoreLocation | The certificate store location to get. | true | false | |
StoreName | StoreName | The certificate store name to get. | true | false |
System.Security.Cryptography.X509Certificates.X509Store.
Get-CertificateStore -StoreLocation LocalMachine -StoreName My
Get the local computer's Personal certificate store.
Get-CertificateStore -StoreLocation CurrentUser -StoreName Root
Get the current user's Trusted Root Certification Authorities certificate store.