none
Add-IPAllowListEntry from a list of IP addresses??

    Question

  • Hello!

    I have compiled a list of friendly IP addresses I'd like to add to my Edge Transport servers content filters.  The list is 180+ entries in size and I really am not looking forward to entering these by hand.  I tried something like "Add-IPAllowListEntry -IPAddress < C:\temp\list.txt, but PS rejected that with an error "The '<' operator is reserved for future use."

    Has anyone found another way to bulk enter these IP addresses?

    Thanks to all for looking!

    Gregg

    Thursday, November 19, 2015 6:38 PM

Answers

  • Hi,

    Create a text file with the list of 180 IP addresses, save it as c:\temp\IPAddresses.txt, for example then run the below script:

    Get-Content C:\temp\IPAddresses.txt | % {Add-IPAllowListEntry -IPAddress $_}

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010, MCTS SQL 2012, MCTS SharePoint 2007, VCP4, VCP5, CCNA

    Blog: http://markgossa.blogspot.com   LinkedIn:

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    • Marked as answer by gregg_hughes Thursday, November 19, 2015 10:22 PM
    Thursday, November 19, 2015 9:16 PM

All replies

  • Hi,

    Create a text file with the list of 180 IP addresses, save it as c:\temp\IPAddresses.txt, for example then run the below script:

    Get-Content C:\temp\IPAddresses.txt | % {Add-IPAllowListEntry -IPAddress $_}

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010, MCTS SQL 2012, MCTS SharePoint 2007, VCP4, VCP5, CCNA

    Blog: http://markgossa.blogspot.com   LinkedIn:

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    • Marked as answer by gregg_hughes Thursday, November 19, 2015 10:22 PM
    Thursday, November 19, 2015 9:16 PM
  • That was it!

    Thanks, Mark!

    Thursday, November 19, 2015 10:22 PM