Archive for the ‘powershell’ Category

Needing a quick and dirty growl notification to know when a person restarted their computer, so I wrote up this originally one line script. . ‘\libs\growl\Send-Growl 3.1.ps1’; # #Might need to modify the file a little. $str = @(“down”, “up”); $last_ds = $false; while(1) { $new_ds = Test-Connection TargetHost -Quiet -Count 2; if($new_ds -ne $last_ds) […]

For a while now I’ve wanted to make use of PowerShell to do things like what you would use PHP for with Apache, but nothing I found worked, not even cgi-bin stuff. So I figured, why not just build my own? By using stuff like HttpListener, it’s pretty easy to get started and worry more […]

Updates HE public IP records for your tunnel (for instance at the coffee shop), finds the first available interface that is connected and creates a v6v4tunnel using that IP. See script for where you need to edit. function fastpingtest { $ping = New-Object System.Net.NetworkInformation.Ping; $ping.Send(“”, 1000).status -eq “success”; } $endtime = [datetime]::Now.AddMinutes(1); $mapipv6 = $false; […]

From what I can tell, there aren’t many…if any, IPv6 address range calculators. While I read it is recommended that you use the entire /64 block, I don’t think it’s always necessary to do so. Besides, what happens when you want to route only a portion of the block to one place? Example usage: ipv6range.ps1 […]

Nick asked, “This script looks good. Would you mind adding comments to it to describe its logic? Also, it doesn’t appear to like having colons in MAC addresses even though colons is pretty standard. Thanks for sharing your script!” (link). Well Nick, here you are! I hope it helps! param ( [parameter(Position=0, Mandatory = $true, […]

Tracing stuff with tracert or traceroute you can’t specify a starting TTL. So there will always be routers that show up and waste time. This code is pretty rudimentary. Hopefully I’ll be able to expand on it to include ipv6 and make it faster. param( $targetIP, $BeginHop = 1, $EndHop = 30, $timeout = 1000, […]

In this revision, I’ve added support for IP based wake ups. However, the IP needs to be in the local ARP table. param ( [parameter(Position=0, Mandatory = $true, ParameterSetName=”bymac”, HelpMessage=”Wake up a machine by known mac address.”)] [string] $targetMac, [parameter(Position=0, mandatory = $true, ParameterSetName=”byip”, HelpMessage=”Wake up a machine by last known IP address.”)] [Net.IPAddress] $targetIP, […]

It’s been awhile, but I haven’t been too lazy! I’ve got some projects currently in the works and a new server that I’m getting ready. In the mean time though, check out this super handy (to me at least) Visio to PHPWeathermap converter. At this time, it only gets network nodes and links them based […]