WindowsServerMethods
public static class WindowsServerMethods
1. Methods
1.1. ConfigureDNSServer(ISystemHost, DirectoryService)
public static string ConfigureDNSServer(ISystemHost host, DirectoryService DirectoryService)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
DirectoryService |
DirectoryService |
Returns: string
1.2. CreateUser(LDAPConnection, User)
public static void CreateUser(this LDAPConnection ad, User user)
| Name | Type | Description |
|---|---|---|
ad |
LDAPConnection |
|
user |
User |
1.3. DisableDHCPServer(ISystemHost)
public static string DisableDHCPServer(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
Returns: string
1.4. EnableDHCPServer(ISystemHost)
public static string EnableDHCPServer(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
Returns: string
1.5. EnsureUser(LDAPConnection, User)
public static UserPrincipal EnsureUser(this LDAPConnection ad, User user)
| Name | Type | Description |
|---|---|---|
ad |
LDAPConnection |
|
user |
User |
Returns: UserPrincipal
1.6. GetDomainAdmins(LDAPConnection)
public static GroupPrincipal GetDomainAdmins(this LDAPConnection ad)
| Name | Type | Description |
|---|---|---|
ad |
LDAPConnection |
Returns: GroupPrincipal
1.7. InstallADForest(ISystemHost, DirectoryService)
public static string InstallADForest(ISystemHost host, DirectoryService DirectoryService)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
DirectoryService |
DirectoryService |
Returns: string
1.8. InstallDHCPServer(ISystemHost, DirectoryService)
public static string InstallDHCPServer(ISystemHost host, DirectoryService DirectoryService)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
DirectoryService |
DirectoryService |
Returns: string
1.9. MakeDomainAdmin(LDAPConnection, User)
public static string MakeDomainAdmin(this LDAPConnection ad, User user)
| Name | Type | Description |
|---|---|---|
ad |
LDAPConnection |
|
user |
User |
Returns: string
1.10. SetIPv4Configuration(ISystemHost, NETSetupDC, SystemManagement.Contracts.Elements.IP, string)
public static string SetIPv4Configuration(ISystemHost host, NETSetupDC dc, SystemManagement.Contracts.Elements.IP gatewayIp, string secondaryDnsIp = null)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
dc |
NETSetupDC |
|
gatewayIp |
SystemManagement.Contracts.Elements.IP |
|
secondaryDnsIp |
string |
Returns: string
1.11. SetStandaloneClientIPv4(ISystemHost, IP, IP, string)
Pins a static IPv4 on the primary wired adapter of a STANDALONE (workgroup) Windows client so the node is reachable at its config IP over the LAN (admin share \\ip\c$). Distinct from the DC overload: NO domain DNS registration (a workgroup node has no AD to register into) and the primary DNS is caller-supplied (gateway or Nix Dns VM) rather than the DC’s own 127.0.0.1. Mirrors the DC /24 mask. Config-driven: staticIp/gatewayIp come from config.
public static string SetStandaloneClientIPv4(ISystemHost host, IP staticIp, IP gatewayIp, string primaryDnsIp)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
staticIp |
IP |
|
gatewayIp |
IP |
|
primaryDnsIp |
string |
Returns: string