3

We've recently been working with the documentation here to set up some access policies for a new DHCP server.

I've been able to successfully import 600+ records with the Set-DhcpServerv4Policy -Name -ScopeID command.

This seems to have wiped out the 2 records that were already in there, which leads to where I am running into issue.

I am trying to search the list that is now there to see if those MACs were included using Get-DhcpServerv4Policy -Name "Allow Private" -ScopeId 192.168.16.0 but all I get is an condensed response of the MAC's.

Name : Allow Private Description : Allow access to Private Wireless Network Enabled : False ScopeId : 192.168.16.0 ProcessingOrder : 2 Condition : OR VendorClass : UserClass : MacAddress : {EQ, 00-06-5b-22-xx-xx, 00-08-ca-e7-xx-xx, 00-0e-35-de-e5-xx...}e

I've added the -fl switch and get the same results.

Windows Server 2008 R2 had an export feature but I don't see it here in Windows Server 2012.

If the MAC's aren't in the list I need to add them - and am hoping not to keep the list I have and just add them to it - but if I have to do that I will, unless there is an update command that I am missing.

Thanks for any thoughts.

3
  • 1
    Not sure what exactly you need but you can list out the MACs with Get-DhcpServerv4Policy -Name "Allow Private" -ScopeId 192.168.16.0 | Select-Object -ExpandProperty MacAddress Commented Jun 19, 2014 at 16:08
  • Thanks! That actually answered both my questions because I was then able to test adding new macs. If you out your comment as an answer I can mark it as such. Commented Jun 19, 2014 at 18:32
  • Ok, not a problem. Wasn't sure it was going to be enough information for your needs. Commented Jun 19, 2014 at 18:45

1 Answer 1

1

If you just want to expand the MacAddress collection you can do something like the following.

 Get-DhcpServerv4Policy -Name "Allow Private" -ScopeId 192.168.16.0 | Select-Object -ExpandProperty MacAddress 

I've also seen shorthand examples for expanding collections.

(Get-DhcpServerv4Policy -Name "Allow Private" -ScopeId 192.168.16.0).MacAddress 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.