Created
April 22, 2017 14:41
-
-
Save PixelRobots/35076a4b7f219cb68d13fde30cacf607 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add subnet to sites and service | |
Write-Host "Add Subnet to Site" | |
$Subnet = read-host "Enter subnet in format 10.10.10.0/24" | |
$desc = read-host "Enter description eg: 10.10.10.0/255.255.255.0" | |
New-ADObject -Name:$subnet -Type subnet -Description:$desc -OtherAttributes @{location="Yellow-Pixel";siteObject="CN=Yellow-Pixel,CN=Sites,CN=Configuration,DC=ad,DC=testpixels,DC=co,DC=uk"} -Path "CN=Subnets,CN=Sites,CN=Configuration,DC=ad,DC=testpixels,DC=co,DC=uk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment