Skip to content

Instantly share code, notes, and snippets.

View mvanantw's full-sized avatar

Mario van Antwerpen mvanantw

View GitHub Profile
@mvanantw
mvanantw / Get-MvaIpLocation.ps1
Created January 18, 2019 14:32
PowerShell function to get the geolocation for one or more IP Addresses
function Get-MvaIpLocation {
<#
.SYNOPSIS
Retrieves Geo IP location data
.DESCRIPTION
This command retrieves the Geo IP Location data for one or more IP addresses
.PARAMETER IPAddress <String[]>
Specifies one or more IP Addresses for which you want to retrieve data for.
.EXAMPLE
Get-MvaIpLocation -ipaddress '124.26.123.240','123.25.96.8'
@mvanantw
mvanantw / Add-MvaNetFirewallRemoteAdressFilter.ps1
Last active July 30, 2020 20:23
PowerShell function to add one or more IP addresses to the scope of a Windows Firewall Rule
function Add-MvaNetFirewallRemoteAdressFilter {
<#
.SYNOPSIS
This function adds one or more ipaddresses to the firewall remote address filter
.DESCRIPTION
With the default Set-NetFirewallAddressFilter you can set an address filter for a firewall rule. You can not use it to
add a ip address to an existing address filter. The existing address filter will be replaced by the new one.
The Add-MvaNetFirewallRemoteAdressFilter function will add the ip address. Which is very usefull when there are already
many ip addresses in de address filter.