< Back

Remove-ProtectedDataCredential

Sun Jan 19, 2020 5:37 pm

NAME Remove-ProtectedDataCredential



SYNOPSIS

Removes copies of encryption keys from a ProtectedData object.





SYNTAX

Remove-ProtectedDataCredential [-InputObject] <Object> [-Certificate <Object[]>] [-Password <SecureString[]>]

[-Passthru] [<CommonParameters>]





DESCRIPTION

The KeyData copies in a ProtectedData object which are associated with the specified Certificates and/or Passwords

are removed from the object, unless that removal would leave no KeyData copies behind.





PARAMETERS

-InputObject <Object>

The ProtectedData object which is to be modified.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Certificate <Object[]>

RSA or ECDH certificates that you wish to remove from this ProtectedData object. You can pass an

X509Certificate2 object to this parameter, or you can pass in a string which contains either a path to a

certificate file on the file system, a path to the certificate in the Certificate provider, or a certificate

thumbprint (in which case the certificate provider will be searched to find the certificate.)



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Password <SecureString[]>

Passwords in SecureString form which are to be removed from this ProtectedData object.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Passthru [<SwitchParameter>]

If this switch is used, the ProtectedData object will be written to the pipeline after processing is complete.



Required? false

Position? named

Default value False

Accept pipeline input? false

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



INPUTS

[PSObject]



The input object should be a copy of an object that was produced by Protect-Data.





OUTPUTS

None, or

[PSObject]





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$protectedData | Remove-ProtectedDataCredential -Certificate $thumbprints -Password $passwords



Removes certificates and passwords from an existing ProtectedData object.











RELATED LINKS

Protect-Data

Unprotect-Data

Add-ProtectedDataCredential