Archive for the ‘concepts’ Category

Wake-on-Lan (WOL) via Powershell

Despite what others may say, Wake-on-LAN isn’t magic and isn’t that complicated a feat to do anymore. With Powershell and .NET you can have the power of WOL without having to resort to third-party applications! Code/Script: param ( $targetMac, $network = [net.ipaddress]::Broadcast, $subnet = [net.ipaddress]::Broadcast ) try { if($network.gettype().equals([string])) { $network = [net.ipaddress]::Parse($network); } if($subnet.gettype().equals([string])) [...]

Inverse ARP

While researching fast ways to find a relationship between a MAC and IP address, I dug up some info on Inverse ARP and found out that it isn’t widely a supported protocol. Basically, it’s only used in frame relay networks, which doesn’t help matters. So I did what any sensible geek does, I hacked something [...]

Of IPs & Subnets

While if you look, there are tools to calculate a IP subnet/address range, they all seem to rely on string splitting and converting the address to binary manually. Which I think is bulky, hard to maintain, and more importantly, not that elegant. So pulling to mind my Cisco CCNA classes where my instructor would drill [...]

Restoring Hyper-V VM with snapshot tree

For whatever reason, you’ve lost your virtual machine settings in Hyper-V and it just so happened they are snapshots. I sure hope that this was a test server and not a production one! Tsktsk! By now, you’ve probably scoured the interweb searching for a cure, and you’re in luck, you’ve found a way to get [...]

My first cmdlet, Out-Web

It’s been a while since I’ve done a for fun computer project, so I decided I wanted to learn how to make PowerShell Cmdlets. The problem was that I couldn’t think of really anything I wanted to make! Then one day I was reading Lee Holmes’ blog, saw the “Out-Web” and had a project. Download [...]

MS-SQL Powershell database backup

Recently one of our SQL clusters decided it was a good idea to not backup databases anymore. So today my boss told me to get something to bandaid the situation until we can fix the situation (which will likely be an upgrade/reinstall). To learn more check out the MSDN pages on the Microsoft.SqlServer.Management.Smo namespace. # [...]

Windows 7 Powershell LogonUI Changer

Based off of the W7C LogonUI Changer, this Powershell script should make changing the LogonUI background easier for the IT admins out there. Download win7logonui.zip (Includes the ImageProcessor source and DLL) Usage: After copying or building imageprocessor.dll move it to the same folder as win7logonui.ps1 (or edit the script). Example: win7logonui.ps1 \path\to\image.jpg Set $DebugPreference to [...]

Ad-hoc fileshares

A little concept I’ve been working on every now and again is ad-hoc shares. The reasoning behind it is that committees and other short lived inter-department groups need something to share documents with that can be backed up. Email can be a hassle and quickly fills quotas, IT staff probably hates the idea of users [...]

Simple Powershell Site Crawler

The following code is a mental recreation with improvements (and thus untested) of a quickly written powershell script from last night. This is simply an example of how to get started, and so it’s up to you to write your own code for finding what you want. #Set the page you want to start at [...]

More chess

I’ve been finding myself thinking about my chess project from…a couple a years ago. Most of it’s been in how to better use OOP principles as well as make it more secure (like take out the eval call for starters). I’ve yet to make it more secure, but I have added a method (movedSpaces()) that [...]