Hope you all are doing good… back again
This time I am trying to get the DHCP server scope from 2 servers and trying to collect the report into a csv file;
I am using following script;
$ab = Get-DhcpServerv4Scope
$a = $ab[6,8]
foreach($b in $a)
Get-DhcpServerv4Scope -ComputerName $b.dnsname | Export-Csv c:\report.csv
This script is giving me the output from only one server and that too randomly. I cross verified it using
Get-Help Get-DhcpServerv4Scope -full, found that ComputerName parameter is accepting a single value.
Kindly help me with the workaround.