DomainJoinMethods
public static class DomainJoinMethods
1. Methods
1.1. ForceUnjoinDomain(ISystemHost)
public static void ForceUnjoinDomain(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
1.2. IsDomainJoined(ISystemHost)
Determines whether the current machine is joined to a domain by querying WMI.
public static bool IsDomainJoined(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
The system host. |
Returns: bool — True if the machine is domain-joined, false otherwise (including non-Windows).
1.3. JoinDomain(Live, string, string, SecretString)
public static string JoinDomain(this Live live, string domainName, string admin, SecretString password)
| Name | Type | Description |
|---|---|---|
live |
Live |
|
domainName |
string |
|
admin |
string |
|
password |
SecretString |
Returns: string
1.4. JoinDomain(Live, string, string, string)
public static string JoinDomain(this Live live, string domainName, string admin, string password)
| Name | Type | Description |
|---|---|---|
live |
Live |
|
domainName |
string |
|
admin |
string |
|
password |
string |
Returns: string
1.5. JoinDomain(NETSetupConfig, ISystemHost)
public static void JoinDomain(NETSetupConfig netSetupConfig, ISystemHost host)
| Name | Type | Description |
|---|---|---|
netSetupConfig |
NETSetupConfig |
|
host |
ISystemHost |
1.6. JoinDomain(string, string, string)
public static string JoinDomain(string domainName, string admin, string password)
| Name | Type | Description |
|---|---|---|
domainName |
string |
|
admin |
string |
|
password |
string |
Returns: string
1.7. JoinDomainToOu(ISystemHost, string, string, string, string)
Credential-explicit twin of NETSetup.Extensions.DomainJoinMethods.JoinDomainToOu(NETSetup.Entities.NETSetupConfig,ISystemHost,System.String), for the join-domain verb where the operator passes the domain and credentials by hand and there is no customer config to read them from.
public static string JoinDomainToOu(ISystemHost host, string domainName, string domainAdmin, string password, string ouPath)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
domainName |
string |
|
domainAdmin |
string |
|
password |
string |
|
ouPath |
string |
Returns: string — Empty string on success, otherwise the error text.
1.8. JoinDomainToOu(NETSetupConfig, ISystemHost, string)
Joins the domain AND places the computer object in ouPath in one shot.
public static string JoinDomainToOu(NETSetupConfig netSetupConfig, ISystemHost host, string ouPath)
| Name | Type | Description |
|---|---|---|
netSetupConfig |
NETSetupConfig |
|
host |
ISystemHost |
|
ouPath |
string |
Returns: string — Empty string on success, otherwise the error text.
1.9. UnjoinDomain(Live, string, string)
A Live extension method that unjoin domain.
public static bool UnjoinDomain(this Live live, string domainUser, string domainUserPassword)
| Name | Type | Description |
|---|---|---|
live |
Live |
The live to act on. |
domainUser |
string |
The domain user. |
domainUserPassword |
string |
The domain user password. |
Returns: bool — True if it succeeds, false if it fails.