Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: desktop apps only
The PresharedKey property gets or sets the preshared key for IPsec authentication. A preshared key is a string of text that is configured on both the VPN client and the VPN server. A preshared key provides a relatively weak authentication method. We therefore recommend that you use it only in the interim when your public key infrastructure (PKI) is being deployed to obtain computer certificates, or when a preshared key is required by VPN clients.
This property is read/write.
Syntax
HRESULT put_PresharedKey(
  BSTR bstrPresharedKey
);
HRESULT get_PresharedKey(
  BSTR *pbstrPresharedKey
);
' Data type: String
Property PresharedKey( _
  ByVal bstrPresharedKey As BSTR, _
  ByVal pbstrPresharedKey As BSTR _
) As String
Property value
String that specifies the preshared key for IPsec authentication.
Error codes
These property methods return S_OK if the call is successful; otherwise, they return an error code.
Remarks
This property is read/write. Its default value is an empty string.
Requirements
Minimum supported client  | 
Windows Vista | 
Minimum supported server  | 
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) | 
Version  | 
Forefront Threat Management Gateway (TMG) 2010 | 
IDL  | 
Msfpccom.idl | 
DLL  | 
Msfpccom.dll | 
See also
Build date: 7/12/2010