Partager via


MachineIdentityManager.GetCert Method (String, String, String, String, String, Boolean)

 

Retrieves the certification for the specified dns host name and netbios name.

Namespace:   Microsoft.WindowsServerSolutions.Devices.Identity
Assembly:  MachineIdentityObjectModel (in MachineIdentityObjectModel.dll)

Syntax

public static X509Certificate2 GetCert(
    string serverName,
    string dnsHostName,
    string netbiosName,
    string userName,
    string password,
    bool bForce
)
public:
static X509Certificate2^ GetCert(
    String^ serverName,
    String^ dnsHostName,
    String^ netbiosName,
    String^ userName,
    String^ password,
    bool bForce
)
Public Shared Function GetCert (
    serverName As String,
    dnsHostName As String,
    netbiosName As String,
    userName As String,
    password As String,
    bForce As Boolean
) As X509Certificate2

Parameters

  • serverName
    Type: System.String

    The name of the server to be contacted.

  • userName
    Type: System.String

    The user name to use on the server.

  • bForce
    Type: System.Boolean

    true to force the server to overwrite the computer account; otherwise, false.

Return Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate2

A X509Certificate2 object that specifies the certification.

See Also

GetCert Overload
MachineIdentityManager Class
Microsoft.WindowsServerSolutions.Devices.Identity Namespace

Return to top