Amin El-Zein
asked on
ip list command generator power shell script
Hello,
I have txt file that contation list of ip for example
1,1,1,1
0.0.0.0/24
172.16.0.0/24
172.16.0.1
I want to make a script with power shell
that generate anew file for my MikroTik to add the ips to address list the final file will be for example: list.rsc
/ip firewall address-list
add address=1,1,1,1 comment="lsit" list=anti
add address=0.0.0.0/24 comment="lsit" list=anti
add address=172.16.0.0/24 comment="lsit" list=anti
add address=172.16.0.1 comment="lsit" list=anti
thanks.
I have txt file that contation list of ip for example
1,1,1,1
0.0.0.0/24
172.16.0.0/24
172.16.0.1
I want to make a script with power shell
that generate anew file for my MikroTik to add the ips to address list the final file will be for example: list.rsc
/ip firewall address-list
add address=1,1,1,1 comment="lsit" list=anti
add address=0.0.0.0/24 comment="lsit" list=anti
add address=172.16.0.0/24 comment="lsit" list=anti
add address=172.16.0.1 comment="lsit" list=anti
thanks.
ASKER
thank u
i have a special case that some ip in the mail list is like
1.1.1.1 #comment
i just want to take the ip or the ip with subnet
also i have a blank raw somtimes
thanks.
i have a special case that some ip in the mail list is like
1.1.1.1 #comment
i just want to take the ip or the ip with subnet
also i have a blank raw somtimes
thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window