I have made a powershell script to find my external IP address. Here is the code I have so far:
$wc=New-Object net.webclient
$wc.downloadstring("http://checkip.dyndns.com") -replace "[^\d\.]" >External_IP.txt
Im going to have this script run every week and wish to keep a log of the IP address changes. For now it saves the external IP address in a text file called External_IP.txt. When run multiple times it doesn’t add a new line to the text file.
Could someone give me info on this please? =)
Pipe to the
Out-Filecmdlet and specify the Append switch