File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change 4242 } # end begin block
4343
4444 process {
45- # Check if the $Server is listed in the objects returned by Get-DhcpServerInDC.
46- $DhcpServers = Get-DhcpServerInDC
47- if ($DhcpServers.DnsName -notmatch $Server ) {
48- Write-Warning - Message " The server `' $Server `' is not an authorized DHCP server in the domain."
49- return
50- }
51-
52- # Verify that the server is reachable.
53- try {
54- $null = Test-NetConnection - ComputerName $Server - Count 1 - ErrorAction Stop
55- } catch {
56- Write-Error " Unable to connect to server: $Server "
57- return
58- }
59-
6045 # Get all IPv4 DHCP server options and check the options set on each.
6146 Write-Host ' Checking DHCP Server Options....' - ForegroundColor Green - BackgroundColor Black
6247 $ServerOptions = Get-DhcpServerv4OptionValue
You can’t perform that action at this time.
0 commit comments