Powerscript: How to Get your Public IP Address

For some reason, you want to write a small script to grab your public IP address and email it to you.  Here is one! $SiteAddress = “http://icanhazip.com” $HttpContent = Invoke-WebRequest -URI $SiteAddress ############################################################### $From = “test@gmail.com” $To = “receipient@gmail.com” $Cc = “receipient2@gmail.com” $Attachment = “C:\temp\Some random file.txt” $Subject = “Email…

Continue reading