Use example resources
'PowerShell DHCP'
Use Video tutorials
'Youtube DHCP management'
Use the built-in cmdlets
Get-Command -Name '*DHCP*' |
Where-Object -Property Name -like '*scope*' |
Format-Table -AutoSize
# Results
<#
CommandType Name Version Source
----------- ---- ------- ------
Function Add-DhcpServerv4FailoverScope 2.0.0.0 DhcpServer
Function Add-DhcpServerv4MulticastScope 2.0.0.0 DhcpServer
Function Add-DhcpServerv4Scope 2.0.0.0 DhcpServer
Function Add-DhcpServerv4Superscope 2.0.0.0 DhcpServer
Function Add-DhcpServerv6Scope 2.0.0.0 DhcpServer
Function Get-DhcpServerv4MulticastScope 2.0.0.0 DhcpServer
Function Get-DhcpServerv4MulticastScopeStatistics 2.0.0.0 DhcpServer
Function Get-DhcpServerv4Scope 2.0.0.0 DhcpServer
Function Get-DhcpServerv4ScopeStatistics 2.0.0.0 DhcpServer
Function Get-DhcpServerv4Superscope 2.0.0.0 DhcpServer
Function Get-DhcpServerv4SuperScopeStatistics 2.0.0.0 DhcpServer
Function Get-DhcpServerv6Scope 2.0.0.0 DhcpServer
Function Get-DhcpServerv6ScopeStatistics 2.0.0.0 DhcpServer
Function Remove-DhcpServerv4FailoverScope 2.0.0.0 DhcpServer
Function Remove-DhcpServerv4MulticastScope 2.0.0.0 DhcpServer
Function Remove-DhcpServerv4Scope 2.0.0.0 DhcpServer
Function Remove-DhcpServerv4Superscope 2.0.0.0 DhcpServer
Function Remove-DhcpServerv6Scope 2.0.0.0 DhcpServer
Function Rename-DhcpServerv4Superscope 2.0.0.0 DhcpServer
Function Set-DhcpServerv4MulticastScope 2.0.0.0 DhcpServer
Function Set-DhcpServerv4Scope 2.0.0.0 DhcpServer
Function Set-DhcpServerv6Scope 2.0.0.0 DhcpServer
#>
Use the examples from the help files to get started or complete your task
# Get specifics for a module, cmdlet, or function
(Get-Command -Name Get-DhcpServerv4Scop).Parameters
(Get-Command -Name Get-DhcpServerv4Scop).Parameters.Keys
Get-help -Name Get-DhcpServerv4Scop -Examples
Get-help -Name Get-DhcpServerv4Scop -Full
Get-help -Name Get-DhcpServerv4Scop -Online
# Find all cmdlets / functions with a target parameter
Get-Command -CommandType Cmdlet |
Where-Object {
Try {$PSItem.parameters.keys -match 'credential'}
Catch{}
}|
Out-GridView -PassThru -Title '
Available cmdlets which has a specific parameter'
Get-Command -CommandType Function |
Where-Object {
Try {$PSItem.parameters.keys -match 'credential'}
Catch{}
}|
Out-GridView -PassThru -Title '
Available functions which has a specific parameter'
# Get property enums/options for a specifc cmdlet/function
(Get-Service | Select-Object -First 1).Status.GetType()
[System.ServiceProcess.ServiceControllerStatus]::
GetNames([System.ServiceProcess.ServiceControllerStatus])
Look for other modules/scripts to leverage
Find-Module -Name '*DHCP*' | Format-Table -AutoSize
# Results
<#
Version Name Repository Description
------- ---- ---------- -----------
2.0.0.0 xDhcpServer PSGallery Module with DSC Resources for DHCP Server area
1.3 DHCPClient PSGallery Sample module for retrieving DHCP client details, based on the script published by Ingmar Verheij at https://www.ingmarver...
1.2.1 DHCPMigration PSGallery A module to copy various DHCP information from 1 server to another.
1.0.0.3 Read-DHCPLogFiles PSGallery A small PS module to read DHCP txt logs
1.3 cDhcpServerDynamicUpdate PSGallery Class based resource to configure DHCP server dynamic updates
#>
Find-Script -Name '*DHCP*' | Format-Table -AutoSize
# Results
<#
Version Name Repository Description
------- ---- ---------- -----------
1.0.0 NetIPInterface_EnableDHCP_Config PSGallery Enabling DHCP for the IPv4 Address and DNS on the adapter with alias 'Ethernet'.
1.0.0 DnsServerAddress_EnableDHCP_Config PSGallery Enabling DHCP for the IPv4 Address and DNS on the adapter with alias 'Ethernet'.
#>