Blog Article: http://www.lazywinadmin.com/2013/11/powershell-add-ad-site-subnet.html
DESCRIPTION
This function allow you to add a subnet object in your active directory using ADSI
PARAMETERS
-Subnet <String>
Specifies the Name of the subnet to add
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-SiteName <String>
Specifies the Name of the Site where the subnet will be created
Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Description <String>
Specifies the Description of the subnet
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-location <String>
Specifies the Location of the subnet
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
# Load the function in cache . .\Add-ADSubnet.ps1
# Load the function in cache . .\Add-ADSubnet.ps1
Import-CSV .\Subnet.csv | Add-ADSubnet -verbose
Import-CSV .\Subnet.csv | Add-ADSubnet -verbose