Site icon TOSS

Test-ADDSDomainInstallation

powershell

Test-ADDSDomainInstallation is accessible with the help of addsdeployment module. To install addsdeployment on your system please refer to this link.

Synopsis

Runs the prerequisites (only) for installing a new Active Directory domain configuration.

Description

The Test-ADDSDomainInstallation cmdlet runs those prerequisite checks (only) which would be performed if you were to use the Install-ADDSDomain cmdlet to install a new Active Directory domain configuration. It differs from using the -WhatIf parameter with the Install-ADDSDomain cmdlet in that instead of summarizing the changes that would occur during the installation process, this cmdlet actually tests whether those changes are possible given the current environment.

For more information on the scope of these prerequisite checks that the ADDSDeployment module performs when using this cmdlet see the section “Prerequisite Checking” in Understand and Troubleshoot AD DS Simplified Administration.

Parameters

-ADPrepCredential 
         Specifies the user name and password that corresponds to the account to be used for running operations (if they are required) to prepare Active Directory prior to the installation of this domain. Specify "(Get-Credential)" to prompt the user to supply a password.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-AllowDomainReinstall <SwitchParameter>
    If this parameter is included, it specifies that an existing domain is to be recreated.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-CreateDnsDelegation <SwitchParameter>
    Indicates whether to create a DNS delegation that references the new DNS server that you are installing along with the domain controller. Valid for Active Directory-integrated DNS only. The default is computed automatically based on the environment.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Credential <PSCredential>
    Specifies the user name and password that corresponds to the account used to install the domain controller. Specify "(Get-Credential)" to prompt the user to supply a password.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DatabasePath <String>
    Specifies the fully qualified, non?Universal Naming Convention (UNC) path to a directory on a fixed disk of the local computer that contains the domain database, for example, C:\Windows\NTDS. The default is %SYSTEMROOT%\NTDS.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DnsDelegationCredential <PSCredential>
    Specifies the user name and password (account credentials) for the user creating DNS delegation. This parameter is skipped if the value for the -CreateDnsDelegation parameter is either specified or computed to be $false.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainMode <DomainMode>
    Specifies the domain functional level during creation of a new domain. Supported values for this parameter can be either a valid integer or a corresponding enumerated string value. For example, to set the domain mode level to Windows&nbsp;Server&nbsp;2008&nbsp;R2, you can specify either a value of 4 or "Win2008R2". Other supported values include those for Windows&nbsp;Server&nbsp;2003 (2, Win2003) Windows&nbsp;Server&nbsp;2008 (3, Win2008) and Windows Server 2012 (5, Win8). The domain functional level cannot be lower than the forest functional level, but it can be higher. The default is Windows Server 2012 (5, Win8).

    Required?                    false
    Position?                    named
    Default value                Windows2008R2
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainType <DomainType>
    Indicates the type of domain that you want to create: a new domain tree in an existing forest (supported values are "TreeDomain" or "tree"), a child of an existing domain (supported values are "ChildDomain" or "child"). The default is ChildDomain.

    Required?                    false
    Position?                    named
    Default value                ChildDomain
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Force <SwitchParameter>
    When this parameter is specified any warnings that might normally appear during the installation of the domain will be suppressed to allow the cmdlet to complete its operation. This parameter can be useful to include when scripting installation.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-InstallDns <SwitchParameter>
    Specifies whether the DNS Server service should be installed and configured for the domain or domain tree. For domain installation, if this parameter is left unspecified and the parent domain (or in the case of a domain tree, the forest root domain) already hosts and stores the DNS names for the domain, then the default for this parameter is $true and the DNS server will be installed. Otherwise, if DNS domain names are hosted outside of Active Directory, the default is $false and no DNS server will be installed.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-LogPath <String>
    Specifies the fully qualified, non-UNC path to a directory on a fixed disk of the local computer that will contain the domain log files, for example, C:\Windows\Logs. The default is %SYSTEMROOT%\NTDS.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-NewDomainName <String>
    If the value set for -DomainType is set to "TreeDomain", this parameter can be used to specify the fully qualified domain name (FQDN) for the new domain tree (for example, "contoso.com"). If the value set for -DomainType is set to "ChildDomain", this parameter can be used to specify a single label domain name for the child domain (for example, specify "corp" to make a new doman "corp.contoso.com" if the new domain is in the contoso.com domain tree).

    Required?                    true
    Position?                    named
    Default value                <mandatory>
    Accept pipeline input?       false
    Accept wildcard characters?  false

-NewDomainNetbiosName <String>
    Specifies the NetBIOS name for the new domain. For NetBIOS names to be valid for use with this parameter they must be single label names of 15 characters or less.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-NoDnsOnNetwork <SwitchParameter>
    Specifies that DNS service is not available on the network. This parameter is used only when the IP setting of the network adapter for this computer is not configured with the name of a DNS server for name resolution. It indicates that a DNS server will be installed on this computer for name resolution. Otherwise, the IP settings of the network adapter must first be configured with the address of a DNS server.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-NoGlobalCatalog <SwitchParameter>
    Specifies that the read-only domain controller (RODC) will not be a global catalog server. By default, the domain controller that you are installing is a global catalog server.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-NoRebootOnCompletion <SwitchParameter>
    Specifies whether to restart the computer upon completion, regardless of success. (By default, reboot upon completion occurs when this cmdlet is used and this parameter is omitted.) As a general rule, Microsoft support recommends that you not use this parameter except for testing or troubleshooting purposes because once configuration has completed the server will not function correctly as either a member server or a DC until it is rebooted.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ParentDomainName <String>
    Specifies the fully qualified domain name (FQDN) of an existing parent domain.

    Required?                    true
    Position?                    named
    Default value                <mandatory>
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ReplicationSourceDC <String>
    Specifies the fully qualified domain name (FQDN) of the domain controller to be used as the source for replicating to this domain. The default value for this parameter is automatically computed from the environment.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-SafeModeAdministratorPassword <SecureString>
    Supplies the password for the administrator account when the computer is started in Safe Mode or a variant of Safe Mode, such as Directory Services Restore Mode. You must supply a password that meets the password complexity rules of the domain and the password cannot be blank. If specified with a value, the value must be a secure string.

    Required?                    false
    Position?                    named
    Default value                <mandatory>
    Accept pipeline input?       false
    Accept wildcard characters?  false

-SiteName <String>
    Specifies the name of an existing site where you can place the new domain controller. The default value is the site that is associated with the subnet that includes the IP address of this server. If no such site exists, the default is the site of the replication source domain controller.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-SkipAutoConfigureDns <SwitchParameter>
    Skips automatic configuration of DNS client settings, forwarders, and root hints. This parameter is in effect only if the DNS Server service is already installed.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

-SysvolPath <String>
    Specifies the fully qualified, non-UNC path to a directory on a fixed disk of the local computer, for example, C:\Windows\SYSVOL. The default is %SYSTEMROOT%\SYSVOL.

    Required?                    false
    Position?                    named
    Default value                NULL
    Accept pipeline input?       false
    Accept wildcard characters?  false

Syntax

Test-ADDSDomainInstallation -NewDomainName <String> -ParentDomainName <String> [-SafeModeAdministratorPassword <SecureString>] [-ADPrepCredential <PSCredential>] [-AllowDomainReinstall] [-CreateDnsDelegation] [-Credential <PSCredential>] [-DatabasePath <String>] [-DnsDelegationCredential <PSCredential>] [-NoDnsOnNetwork] [-DomainMode <DomainMode>] [-DomainType <DomainType>] [-NoGlobalCatalog] [-InstallDns] [-LogPath <String>] [-NewDomainNetbiosName <String>] [-NoRebootOnCompletion] [-ReplicationSourceDC <String>] [-SiteName <String>] [-SkipAutoConfigureDns] [-SysvolPath <String>] [-Force] [<CommonParameters>]

————————– EXAMPLE 1 ————————–
C:\PS>Test-ADDSDomainInstallation -Credential (Get-Credential Delhi\EnterpriseAdmin1) -NewDomainName child -ParentDomainName Delhi.TOSSolution.com -InstallDNS -CreateDNSDelegation -DomainMode Win2003 -ReplicationSourceDC DC1.Delhi.TOSSolution.com -SiteName Houston -DatabasePath “D:\NTDS” -SYSVOLPath “D:\SYSVOL” -LogPath “E:\Logs” -NoRebootOnCompletion
Runs the prerequisites (only) to determine if installing a new child domain named child.Delhi.TOSSolution.com using credentials of Delhi\EnterpriseAdmin1 is possible. This example also installs a DNS server, creates a DNS delegation in the Delhi.TOSSolution.com domain, sets the domain functional level to Windows Server 2003, makes the domain controller a global catalog server in a site named Houston, uses DC1.Delhi.TOSSolution.com as the replication source domain controller, installs the Active Directory database and SYSVOL on the D:\ drive, installs the log files on the E:\ drive, has the server not automatically restart after the domain installation is complete and causes the user to be prompted to provide and confirm the Directory Services Restore Mode (DSRM) password to complete and commit the installation of the domain in Active Directory.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Test-ADDSDomainInstallation

You can also read about
. Install-ADDSDomain

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Exit mobile version