Link to home
Start Free TrialLog in
Avatar of compdigit44
compdigit44

asked on

Export DHCP scope Information

ON my Windows 2012 R2 server I am running the following command which works

 Get-DhcpServerv4Scope | ?{$_.scopeid -like "*18.27.*"}

Now I need to export all scope information from the return scopes and dump it to a CSV. I am having a hard time getting powershell to walk through each scope
ASKER CERTIFIED SOLUTION
Avatar of Church Gate
Church Gate

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of compdigit44
compdigit44

ASKER

Thank you very much, I did find this posting as well be I need to get all configured scope options and not just DNS.

I am trying the script in the following link https://blogs.technet.microsoft.com/poshchap/2015/10/02/create-a-csv-report-of-dhcp-scope-options/ but keep getting the error,,,

At C:\GetScopeSettings.ps1:9 char:46
+ for ($i = ($Options.Count –1); $i -gt -1; $i—) {
+                                              ~
You must provide a value expression following the '—' operator.
    + CategoryInfo          : ParserError: (:) [], ParseExceptio
    + FullyQualifiedErrorId : ExpectedValueExpression
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot for the update.