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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks a lot for the update.
ASKER
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