DHCP - Report with DHCP scope option



 $ListofScopesandTheirOptions = $Null

$PrimaryDHCPServer = "s217124rgvw210"
$Scopes = Get-DhcpServerv4Scope -ComputerName $PrimaryDHCPServer

#For all scopes in the primary server, get the scope options and add them to $LIstofSCopesandTheirOptions
foreach ($Scope in $Scopes)
{
$LIstofSCopesandTheirOptions += Get-DHCPServerv4OptionValue -ComputerName $PrimaryDHCPServer -ScopeID $Scope.ScopeId |select @{label=”DHCPServer”; Expression= {$PrimaryDHCPServer}},@{label=”ScopeID”; Expression= {$Scope.ScopeId}},@{label=”ScopeName”; Expression= {$Scope.Name}},*
}

Comments

Popular posts from this blog

altiris software key

Service Principal Names (SPNs) SetSPN Syntax (Setspn.exe)

Troubleshooting Netlogon Error Codes