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 [...]
Archive for the ‘code’ Category
Export an Exchange 2007 mailbox with Powershell
Yesterday I was tasked with automating old employee mailboxes to PST files for archiving. I guess granting permissions and access the mail via GUI routes was just to cumbersome.
The code below is more like a macro and simply grants mailbox permissions to the running or specified user and then backs up the box and promptly [...]
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
$tree = [...]
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 lists [...]
SNMP.Cisco Engine
Wow, after starting to work on the database again I found that the SNMP.Cisco engine wasn’t returning data on trunk port vlans, which is kind of a problem. I’ve finally nailed it after pouring over the Cisco MIB’s and trying to find out how to find the info. Basically, I need to parse some HEX that tells you what VLAN is allowed on a trunk. The awesome thing about this is that this code/concept could be applied to access ports as well. (0 comments)
SNMP.Cisco Engine
Wow, after starting to work on the database again I found that the SNMP.Cisco engine wasn’t returning data on trunk port vlans, which is kind of a problem. I’ve finally nailed it after pouring over the Cisco MIB’s and trying to find out how to find the info. Basically, I need to parse some HEX that tells you what VLAN is allowed on a trunk. The awesome thing about this is that this code/concept could be applied to access ports as well.
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 = [...]
An advancement!
After my post last week I started work on creating an SNMP Cisco engine for Switchport Map. I just committed a working copy to svn and you can grab a copy from there. It should work with the v0.1 release code. However it will require an install of Net-SNMP (http://www.net-snmp.org/) before it will function. See the snmp.cisco.test.php for details on how to use it. (0 comments)
An advancement!
After my post last week I started work on creating an SNMP Cisco engine for Switchport Map. I just committed a working copy to svn and you can grab a copy from there. It should work with the v0.1 release code. However it will require an install of Net-SNMP (http://www.net-snmp.org/) before it will function. See the snmp.cisco.test.php for details on how to use it.
Something worthwhile
While I haven’t been working on much code for Switchport Map, I have been taking the time to about SNMP. The reason for this is that I’d like to get away from parsing telnet sessions with the switches. This would allow more information to be gleaned and in a manner that would be far friendlier to the programmer. (0 comments)

