DatabaseEncryptionKey.EncryptionState Property
Gets or sets the encryption key state.
Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
<SfcPropertyAttribute> _
Public ReadOnly Property EncryptionState As DatabaseEncryptionState
    Get
'Usage
Dim instance As DatabaseEncryptionKey
Dim value As DatabaseEncryptionState
value = instance.EncryptionState
[SfcPropertyAttribute]
public DatabaseEncryptionState EncryptionState { get; }
[SfcPropertyAttribute]
public:
property DatabaseEncryptionState EncryptionState {
    DatabaseEncryptionState get ();
}
[<SfcPropertyAttribute>]
member EncryptionState : DatabaseEncryptionState
function get EncryptionState () : DatabaseEncryptionState
Property Value
Type: Microsoft.SqlServer.Management.Smo.DatabaseEncryptionState
DatabaseEncryptionState
Remarks
Valid constants and underlying values are listed in the following table:
| Underlying Value | Constant | 
|---|---|
| 0 | None | 
| 1 | Unencrypted | 
| 2 | EncryptioninProgress | 
| 3 | Encrypted | 
| 4 | EncryptionKeyChangesInProgress | 
| 5 | DecryptionInProgress |