New-ADReplicationSubnet

New-ADReplicationSubnet is accessible with the help of addsadministration module. To install addsadministration on your system please refer to this link.

Synopsis

Creates a new Active Directory replication subnet object.

Description

The New-ADReplicationSubnet cmdlet creates a new Active Directory subnet object. Subnet objects (class subnet) define network subnets in Active Directory. A network subnet is a segment of a TCP/IP network to which a set of logical IP addresses is assigned. Subnets group computers in a way that identifies their physical proximity on the network. Subnet objects in Active Directory are used to map computers to sites.

Parameters

-AuthType 
         Specifies the authentication method to use. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                Microsoft.ActiveDirectory.Management.AuthType.Negotiate
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Credential <PSCredential>
    Specifies a user account that has permission to perform this action. The default is the current user.

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

-Description <String>
    Specifies a description of the object. This parameter sets the value of the Description property for the object. The LDAP Display Name (ldapDisplayName) for this property is "description".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Instance <ADReplicationSubnet>
    Specifies an instance of a subnet object to use as a template for a new subnet object.

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

-Location <String>
    A description of the physical location of this subnet.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Name <String>
    Specifies the name of the subnet. This parameter sets the Name property of the Active Directory object. The LDAP Display Name (ldapDisplayName) of this property is "name".

    Required?                    true
    Position?                    1
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-OtherAttributes <Hashtable>
    Specifies object attribute values for attributes that are not represented by cmdlet parameters. You can set one or more parameters at the same time with this parameter. If an attribute takes more than one value, you can assign multiple values. To identify an attribute, specify the LDAPDisplayName (ldapDisplayName) defined for it in the Active Directory schema.

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

-PassThru <SwitchParameter>
    Returns the new or modified object. By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.

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

-Server <String>
    Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following:  Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.

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

-Site <ADReplicationSite>
    The site associated with this subnet.

    Required?                    false
    Position?                    2
    Default value                
    Accept pipeline input?       True (ByPropertyName)
    Accept wildcard characters?  false

-Confirm <SwitchParameter>
    Prompts you for confirmation before running the cmdlet.

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

-WhatIf <SwitchParameter>
    Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Syntax

New-ADReplicationSubnet [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Description <String>] [-Instance <ADReplicationSubnet>] [-Location <String>] [-Name] <String> [-OtherAttributes <Hashtable>] [-PassThru] [-Server <String>] [[-Site] <ADReplicationSite>] [<CommonParameters>]

————————– EXAMPLE 1 ————————–
C:\PS>New-ADReplicationSubnet -Name “192.0.0.0/25”
Create a new subnet named ‘192.0.0.0/25’.

————————– EXAMPLE 2 ————————–
C:\PS>New-ADReplicationSubnet -Name “192.10.0.0/22” -Site Europe -Location “London,Manchester”
Create a new subnet named ‘192.10.0.0/22’ with ‘Europe’ as its associated site, and set the Location property to “London,Manchester”.

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

Get-Command New-ADReplicationSubnet

Get-Command New-ADReplicationSubnet powershell script command cmdlet

You can also read about
. Get-ADReplicationSubnet
. Remove-ADReplicationSubnet
. Set-ADReplicationSubnet

To know more PowerShell cmdlets(Commands) on addsadministration (Active Directory) click here

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

Leave a Reply

Your email address will not be published. Required fields are marked *