Skip to main content

AADSites - Test-AADServicesObject Syntax

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

Test-AADServicesObject returns true or false against a object name and type.  Can be used to check or confirm the existance of a Site / Subnet / Sitelink object in AD.
NAME


Test-AADServicesObject


SYNOPSIS


Checks to see whether an AD object exists with the name and type supplied


SYNTAX


Test-AADServicesObject [-Identity] [-Type] []


DESCRIPTION


Checks to see whether an AD object exists with the name and type supplied.


returns true if exists and false if not.


PARAMETERS


-Identity


Mandatory - The name of the object you want to check.


Position 0.


-Type


Mandatory - The type of the object to check.


Accepts site, subnet or sitelink.


Position 1.


-------------------------- EXAMPLE 1 --------------------------
Simple usage


PS C:\> Test-AADServicesObject -identity Sitename -type Site


-------------------------- EXAMPLE 2 --------------------------


Simple usage


PS C:\> Test-AADServicesObject -identity Sitelinkname -type Sitelink


-------------------------- EXAMPLE 3 --------------------------


Simple usage


PS C:\> Test-AADServicesObject -identity 10.0.1.0/24 -type subnet


Comments