Skip to main content

AADSites - New-AADSite Syntax

This function is part of my AADSites module, which can be downloaded here.  For more info on the module see here.

This function enables you to create a new site.  On Create options available to set include the site links that the site is a member of, the location field and the description.
NAME


New-AADSite

SYNOPSIS

Create a new AD site object

SYNTAX

New-AADSite [-name] [[-SiteLinks] ] [[-Location] ] [[-Description] ] []

DESCRIPTION

This function enables you to create a new AD Site.
You can supply any combination of sitelinks, description or location to add to the new site

PARAMETERS


-name
Mandatory - The name of the object you want to create.
Position 0.

-SiteLinks
Optional - The sitelinks of the site you want to add it to
Position 1.

-Location
Optional - The location of the site you want to set
Position 3.

-Description
Optional - The description of the site you want to set
Position 2.

-------------------------- EXAMPLE 1 --------------------------
Simple usage
new-AADSite -name mainsite1 -Sitelinks "sitelink 1" -location "au/syd/office1" -description "Site description"
-------------------------- EXAMPLE 2 --------------------------
Simple usage - using positional parameters. Also, using multiple sitelinks.
new-AADSite Sitename "sitelink 1,sitelink 2" "au/syd/office1" "Site description"
-------------------------- EXAMPLE 3 --------------------------
Simple usage - only supply one value to set on creation
new-AADSite -name Sitename -location "au/syd/office1"

Comments