![]() If you find my post to be helpful in anyway, please click vote as helpful. If you find that my post has answered your question, please mark it as the answer. $lines | select Name,SubnetMask,StartRange,EndRange,ScopeId,OptionID,OptionName,OptionVendorClass,OptionUserClass |Export-Csv C:\temp\$dhcpserver-ScopeOption.csv -Append -NoTypeInformation $lines = New-Object psobject -Property $Serverproperties $scope | Export-Csv "C:\temp\$DHCPServer-Scopes.csv" -Append -NoTypeInformation With this little helper we can use the Intune Management Extension and design a PowerShell script to: query DHCP server for the Option ID 234 write result. Select-Object OptionID,Name,Value,VendorClass,UserClass,PolicyName Use the command: Get-DHCPScope -Server 'ServerFQDN' That will list all the scopes on the server, with a lot of info for each. ![]() $serveroptions = Get-DHCPServerv4OptionValue -ComputerName $computername.DnsName | Open PowerShell and type in Import-Module .psm1 3. Select-Object "Name","SubnetMask","StartRange","EndRange","ScopeID","State" $scopes = Get-DHCPServerv4Scope -ComputerName $computername.DnsName | ![]() ![]() $computername | Export-Csv C:\temp\DHCPServer.csv -Append -NoTypeInformation ![]() This will get a list of all DHCP servers export to a csv, export each servers scope to individual named csv for each dhcp server, export each servers server option to a separate csv and then export each I think the below should work for what you want. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |