Category Archives: code

Disable rogue domain computers with Powershell

Ever find out that there’s employee’s insist on adding computer to your company’s domain? Hate having to manually check every once in a while for new machines? Fret no more! Here’s a simple script that will simply disable the computer accounts!

#
# disable unauthorized computers
#

## Create the AD object for looping through.
$root = New-Object DirectoryServices.DirectoryEntry “LDAP://CN=Computers,DC=domain,DC=com”

$selector = [...]

Time filter: C# Project files

Here’s a clightly cleaned up and better version of my time filter project thing, businesshours.zip. Archive contains code, build batch file, and binary.
Some changes this round:

Takes into account timezones.
No longer is missing a day in it’s calculations.
Debugging command line argument to track the inner workings.

Should I feel like it:

Code cleanup
Delete unused variables
Useful comments

Time filtering: PHP version

As mentioned before, I originally wrote my time filter in PHP but converted it to C# for speed. So here it is for posterity and reference.
class nonWorkRanges {
public $parse;
public $start;
public $end;

/*
this::start and this::end stucture

day = 1…31
month = 1…12 (xx = reoccurring)
year = YYYY (xxxx = reoccurring)
weekday = 0…6 (sunday…saturday, if this is set we ignore [...]

Time filtering for helpdesks

One of the goals this year is to have an average response time of 15 minutes for all helpdesk tickets, but we have one problem, no way to track or know if we’re getting closer.
During my initial research, the only thing I could find was code that couldn’t be customized through configuration files so it [...]

Route Kill v2

Last time around, Route Kill was pretty simple, just misdirect a route. This time, I added a little more code flexibility, some minor network monitoring and a maliciousness not seen before. This time, it kills the route (deletes the route from the table), packets aren’t even misdirected, they go nowhere!
To get things ready for yourself, [...]

Bug squishing

After getting a Windows XP Virtual PC up and running I was able to test my last project’s update feature in XP…and it didn’t work. From those of you who have Vista like me know that the user profile is no longer under Documents and Settings, but Users.
My original code didn’t take into account spaces [...]

Single exe that can update itself?

For a while now, I’ve been meaning to make a diagnostic application for my coworkers while they are on the road so that we in IT can see what’s going on in their computers. But the problem has been getting the time to make it and deciding what best way to make it in (compiled [...]

Learning the nuances of Visual Studio

I’m starting to use Visual Studio and programming more and more in C#. Mostly this is because I’m finding that creating tools with scripts for my end users to be too cumbersome for them to use. PowerShell scripts are not easily launched by a double click, you need to allow scripts in the first place [...]

Weather based backgrounds

Finally got around to bringing my dynamic weather based background together from the various tools I’ve slowly been working on. But…it only seems to be working in Chrome. :/ Not sure what the matter is with Firefox and IE7.
Still in need of tweaking…and more backgrounds….and day/night differences.
[edit] Apparently it just takes a while for the [...]

OpenVMPS Interface

We’re looking to implement automatic port configurations to keep visitors off the company’s network, but finding a turn key solution proved difficult. So the search began for opensource software that could do the job. Maybe I’m just an idiot, but I’ve been finding that the current OSS such as FreeNAC are pretty inane to set [...]