PublicIPAddress

1.1.1

PublicIPAddress is a PowerShell module for querying public IPv4/IPv6-address and save the IP-address to a file. Optionally can also create a scheduled task to do this periodically.

Most Internet-connections, especially wireless connections have dynamic IP-address that will change at times.

As such it may prove to be challenging to remotely connect to your comput
PublicIPAddress is a PowerShell module for querying public IPv4/IPv6-address and save the IP-address to a file. Optionally can also create a scheduled task to do this periodically.

Most Internet-connections, especially wireless connections have dynamic IP-address that will change at times.

As such it may prove to be challenging to remotely connect to your computer from the Internet. One of the most popular ways to address the issue is to use a service such as DynDNS which provices a static hostname, eg myhomecomputer.domain.net.

But unless you actually need to use a static hostname, an alternative way is to leverage Dropbox, OneDrive, Google Drive or similar cloud service to store public IP-address of your computer in a file.

All you need is a way to periodically check current public IP-address and save that to a file located in a directory that will be synced to a cloud service, which you can then read on your phone or any other computer with access to the Internet.

This PowerShell module provides a function to check current public IP-address and write the IP-address to a file in specified directory. In addition to this, a scheduled task can be created to do this periodically.

If you intend to use a scheduled task, this module should be installed to %systemdrive%:\Program Files\WindowsPowerShell\Modules. Otherwise SYSTEM account cannot find this module and use its functions.

Administrator privileges will also be required to create a scheduled task.

When installing this module from the PowerShell Gallery, use "Install-Module -Name PublicIPAddress -Scope AllUsers" in order to install the module to Program Files.

Queries for IP-address should be limited to no more than once per five minutes. Otherwise your queries my be dropped.
Show more

Minimum PowerShell version

3.0

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PublicIPAddress

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PublicIPAddress

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2016 Juho Lehto. All rights reserved.

Package Details

Author(s)

  • Juho Lehto

Tags

IPv4 IPv6 IP IP-address

Functions

Get-PublicIPAddress Save-PublicIPAddress

Dependencies

This module has no dependencies.

Release Notes

1.0
- Initial release.

1.1
- Save-PublicIPAddress now checks that PowerShell is running with Administrator privileges when using the ScheduledTask switch. Appropriate error message is thrown when running with insufficient privileges.
- Save-PublicIPAddress now creates scheduled task to run as NT AUTHORITY\SYSTEM account, instead of NT AUTHORITY\LOCAL SERVICE. The LOCAL SERVICE account may not have sufficient filesystem permissions to the directory given as argument to the Path parameter, whereas SYSTEM should.
- Updated description of this module.

1.1.1
- Missed one reference to LOCAL SERVICE, which has now been changed to SYSTEM.

FileList

Version History

Version Downloads Last updated
1.1.1 (current version) 1,087 11/24/2016
1.1 20 11/24/2016
1.0 26 11/23/2016