< Back

Get-BuildingMappingFromADSites

Mon Jan 13, 2020 6:26 am

NAME Get-BuildingMappingFromADSites



SYNOPSIS

Retrieves AD Site and Subnet information and creates a subnet mapping file for Call Quality Dashboard (CQD).

Performs Check for overlap and duplicates.





SYNTAX

Get-BuildingMappingFromADSites [[-OutputFileName] <String>] [[-BuildingNameSource] <String>] [[-NetworkName]

<String>] [[-OwnershipType] <String>] [[-BuildingType] <String>] [[-BuildingOfficeType] <String>] [[-City]

<String>] [[-ZipCode] <String>] [[-Country] <String>] [[-State] <String>] [[-Region] <String>] [-ExpressRoute]

[[-InputFileName] <String>] [[-VerboseLogFileName] <String>] [<CommonParameters>]





DESCRIPTION

Get-BuildingMappingFromADSites iterates through all AD Sites and Subnets. All valid IPv4 addresses are exported

into a CSV-style format, all other formats like IPv6 as skipped as CQD doesn't support them today.

You can use the optional parameters to specify additional information for the mapping file, including City,

Country, Region and all other data fields that CQD supports.



The script requires the computer to be domain joined so that it can leverage an AD context to retrieve data.

Computers joined to Azure Active Directory aren't supported.



The script also performs check for overlap (aka supernetting) and duplicate subnet information. This check can be

run without connection to AD if an input file is specified through -InputFileName parameter.





PARAMETERS

-OutputFileName <String>



Required? false

Position? 1

Default value .\\BuildingFile.csv

Accept pipeline input? false

Accept wildcard characters? false



-BuildingNameSource <String>



Required? false

Position? 2

Default value SiteName

Accept pipeline input? false

Accept wildcard characters? false



-NetworkName <String>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OwnershipType <String>



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BuildingType <String>



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-BuildingOfficeType <String>



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-City <String>



Required? false

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ZipCode <String>



Required? false

Position? 8

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Country <String>



Required? false

Position? 9

Default value

Accept pipeline input? false

Accept wildcard characters? false



-State <String>



Required? false

Position? 10

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Region <String>



Required? false

Position? 11

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ExpressRoute [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-InputFileName <String>



Required? false

Position? 12

Default value

Accept pipeline input? false

Accept wildcard characters? false



-VerboseLogFileName <String>



Required? false

Position? 13

Default value VerboseOutput.Log

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





????????? 2018 Microsoft Corporation.??????????????? All rights reserved.??????????????? This document is provided

"as-is." Information and views expressed in this document, including URL and

other Internet Web site references, may change without notice.??????? ???????



This document does not provide you with any legal rights to any intellectual

property in any Microsoft product. Skype for Business and Microsoft Teams customers

and partners may copy, use and share these materials for planning, deployment

and operation of Skype for Business and Microsoft Teams.??????? ???????





You need to run this script from a Domain joined machine to read data from Active Directory.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-BuildingMappingFromADSites



Read AD site and subnet information and create building mapping file.









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



PS C:\\>Get-BuildingMappingFromADSites -BuildingNameSource SubnetDescription



Read AD site and subnet information and create building mapping file, uses site description as a name for the

building.









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



PS C:\\>Get-BuildingMappingFromADSites -OutputFileName 'MyFile.csv' -BuildingOfficeType 'CompanyOwned'



Read AD site and subnet information, use OutputFileName MyFile.csv and assign BuildingOfficeType = CompanyOwned









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-BuildingMappingFromADSites -ExpressRoute



Read AD site and subnet information, mark all sites to be connected via ExpressRoute









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-BuildingMappingFromADSites -InputFileName MyCQDFile.csv



Reads existing CQD building file and performs check for overlapping or duplicate subnets. Accepts both tab and

comma delimited file (.tsv and .csv).











RELATED LINKS

https://docs.microsoft.com/en-us/SkypeF ... using-call

-quality-dashboard#upload-building-information