While using an IPAM solution is a good starting point for a building mapping file, this concept doesn’t work for all customers. Maybe there isn’t a central IPAM solution in place, maybe the export capabilities are limited, or other reasons prevent us from using this data. However, most environments have other data sources that can be leveraged. The PowerShell Module allows you to generate a CQD-compatible building file from different data sources:
- Create a new CQD building file based on AD Site information.
Building names can be retrieved from the site name, site description or subnet description in AD.
Get-BuildingMappingFromADSites
- Create a new CQD building file based on MSFT DHCP servers.
You can run this locally on a DHCP server, specify a DHCP server name or iterate through all authorized DHCP servers in AD.
Get-BuildingMappingFromMSftDHCP
While this data might not be as granular as needed or sometimes might require little bit of manual updates, it certainly provides you with a solid starting point, if not more.
Management of the building mapping file
Once the file is created, you also need to think about ongoing management of that file. Like updates, addition of new sites that went live and other updates. The identification of subnets that are potentially missed in the file is another important aspect. CQD always requires you to upload a new, full file – there is no concept as incremental updates for the building file. CQD will also enforce integrity of that file, you must not have overlapping or duplicate subnet information in that file. The CQDTools module supports you as well:
- Validate an existing CQD building file to check for duplicates and overlaps (subnet/supernet relationship)
Get-BuildingMappingFromADSites -InputFileName MyCQDFile.csv
- Find unmapped subnets using the same internet egress point as already mapped subnets as they are most likely just missed in the building file.
This function leverages the CQDPowerShell module to talk to CQD directly, pull all the required data and return a list of likely missed subnets. Note: this will only work if building mapping file is uploaded (see 1 and 2 for this) and if the missed subnet is using the same internet egress as an already mapped site.
Find-MissingBuildingsInCQD
Where can I get the PowerShell Module?
This PowerShell module is published to PowerShell Gallery. If you are running PowerShell 5 or higher, which is a pre-requisite for this module, simply run Install-Module CQDTools to download and install the module directly from PS Gallery.
What else do I need to know?
The functions all come with help content and have optional parameters. E.g. if you want to get data from all authorized DHCP servers in your environment, you would run:
Get-BuildingMappingFromMsftDHCP -AllADAuthorizedDHCPServers
All functions have help context and examples, so you can run get-help Get-BuildingMappingFromMsftDHCP to get more details on the function, how it works and parameters that you can use.
get-help Get-BuildingMappingFromMsftDHCP
These functions are exposed:
- Find-MissingBuildingsInCQD
- Get-BuildingMappingFromADSites
- Get-BuildingMappingFromMsftDHCP
Call to Action
- Install the Module
- Create and Update your CQD building file
- Give us feedback
Additional Resources
PowerShell Module
https://www.powershellgallery.com/packages/CQDTools/
Overview on CQD
Videos that will help you learn more about CQD and how to use it
CQD Building file documentation
Welcome to the Microsoft Teams Blog! Learn best practices, news, and trends directly from the team behind Microsoft Teams.