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.
Returns the certificate for the local computer.
Namespace: Microsoft.WindowsServerSolutions.Devices.Identity
Assembly: MachineIdentityObjectModel (in MachineIdentityObjectModel.dll)
Syntax
public static X509Certificate2 GetCert(
string userName,
string password,
bool bForce
)
public:
static X509Certificate2^ GetCert(
String^ userName,
String^ password,
bool bForce
)
Public Shared Function GetCert (
userName As String,
password As String,
bForce As Boolean
) As X509Certificate2
Parameters
userName
Type: System.StringThe user name to use on the server.
password
Type: System.StringThe password for the user name.
bForce
Type: System.Booleantrue to force the server to overwrite the computer account; otherwise, false.
Return Value
Type: System.Security.Cryptography.X509Certificates.X509Certificate2
An instance of X509Certificate2.
See Also
GetCert Overload
MachineIdentityManager Class
Microsoft.WindowsServerSolutions.Devices.Identity Namespace
Return to top