< Back

Get-BuildingMappingFromMsftDHCP

Mon Jan 13, 2020 6:27 am

NAME Get-BuildingMappingFromMsftDHCP



SYNOPSIS

Creats a CQD compatible building file from Microsoft DHCP servers.





SYNTAX

Get-BuildingMappingFromMsftDHCP [[-OutputFileName] <String>] [-EnabledOnly] [-AllADAuthorizedDHCPServers]

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





DESCRIPTION

Creats a CQD compatible building file from Microsoft DHCP servers. Retrieves IPv4 DHCP scopes from Msft DHCP

servers and turns them into CQD building information. The result is stored in an output file for validation and

upload to CQD. The script can be run locally on a DHCP Server, or used to retrieve data from a specific server, or

it can iterate through all authorized DHCP servers in AD. Requires Remote Server Administration Tools for DHCP to

be installed on the local machine. This script requires the DHCPServer PowerShell module and read permissions to

the DHCP service. The Scope name is used as the building name. The results file is already in a CQD compatible

format. After manual validation for accuracy it can be uploaded into CQD without any further reformatting.





PARAMETERS

-OutputFileName <String>

Specifies the name of the outputfile containing the subnet mapping data.



Required? false

Position? 1

Default value .\\BuildingFile.csv

Accept pipeline input? false

Accept wildcard characters? false



-EnabledOnly [<SwitchParameter>]

Include only enabled (active) IPv4 DHCP scopes.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-AllADAuthorizedDHCPServers [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DHCPServer <String>

Used to specify a specific DHCP server to retrieve IPv4 DHCP scopes from. Cannot be used together with the

IterateThroughAllServers parameter.



Required? false

Position? 2

Default value localhost

Accept pipeline input? false

Accept wildcard characters? false



-VerboseLogFileName <String>



Required? false

Position? 3

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.??????? ???????



This sript requires permissions to read data from DHCP, i.e. DHCP Users or higher.



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



PS C:\\>Get-BuildingMappingFromMsftDHCP



Gets IPv4 DHCP scopes from a DHCP server, assumes that this script is run on the DHCP server itself.









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



PS C:\\>Get-BuildingMappingFromMsftDHCP -IterateThroughAllServers -EnabledOnly



Gets IPv4 DHCP scopes from all authorized DHCP servers in AD. Includes enalbed IPv4 DHCP scopes only.











RELATED LINKS