August 2007 Entries

Cry Laughing

A friend of mine recently reminded me of the Inexperienced Chili Taster story.  He told me that if wife read it, and loved it.  I told him that I literally cried the first time I read it.  So did she, he said.

Posted On Friday, August 31, 2007 8:23 PM | Comments (0)

NetCmdlets Cheat Sheet (PowerShell)

Last winter, Ben Pearce put together a little PowerShell Cheat Sheet. I printed it out and I keep it handy at my desk. It occurred to me that a NetCmdlets cheat sheet would be useful too, so I borrwed Ben's style and did just that. NetCmdlets Cheat Sheet - .docxNetCmdlets Cheat Sheet - .doc If you see something missing or if there are mistakes, let me know and I will update here. Technorati Tags: PowerShell, NetCmdlets ......

Posted On Friday, August 31, 2007 6:09 PM | Comments (0)

LDAP PowerShell User Account Control

The userAccountControl attribute is used to control the access of a user account. This value can be set to the bitwise OR of a set of flag values, documented here: Property flag Value in hexadecimal Value in decimal SCRIPT 0x0001 1 ACCOUNTDISABLE 0x0002 2 HOMEDIR_REQUIRED 0x0008 8 LOCKOUT 0x0010 16 PASSWD_NOTREQD 0x0020 32 PASSWD_CANT_CHANGE Note You cannot assign this permission by directly modifying the UserAccountControl attribute. For information about how to set the permission programmatically, ......

Posted On Wednesday, August 22, 2007 1:22 PM | Comments (1)

Adam Bell's PowerShell Toolbox

Adam's list of PowerShell tools.

Posted On Tuesday, August 21, 2007 4:10 PM | Comments (0)

Retrieve Remote MAC Address in PowerShell

Shay Levi played off my mac address retreival code yesterday and shared his own PowerShell script to retrieve a mac address. Here's another PowerShell script to retrieve a mac address using get-snmp from NetCmdlets: ## Retrieves the MAC address of an snmp-enabled device ## Returns a hex string that is the MAC address ## ## usage: get-mac [-agent] <string> ## param( [string] $agent = "10.0.1.11" ) #a function to convert an octetstring into a hex string function get-hex($octectstring) { $len ......

Posted On Tuesday, August 21, 2007 9:52 AM | Comments (4)

How to Retrieve Remote MAC Address Programmatically

The question often comes up, how do you find out the MAC address of a remote machine, given its IP address? There are a few ways to do it, but here are two: The first way is to use SNMP. Use whatever SNMP library you like, or create your own. Here are the steps you'll need to take, as well as an example showing how to implement these steps using IP*Works! or IPWorks Secure SNMP. Get the number of interfaces on the device (ifEntryNum - 1.3.6.1.2.1.2.1) For each interface, get the MAC address (ifPhysAddress ......

Posted On Monday, August 20, 2007 5:26 PM | Comments (10)

XKCD today just made me choke on my water

Posted On Thursday, August 16, 2007 11:59 AM | Comments (0)

LDAP PowerShell - Search for Disabled User Accounts

PS C:\> get-ldap -server testboy -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(objectclass=user)(o... Again, there's no need for dozens of LDAP cmdlets. The two LDAP cmdlets included in NetCmdlets, get-ldap and set-ldap, are all you need for most tasks. The above command shows how you would search for disabled user accounts with the get-ldap cmdlet. Technorati Tags: PowerShell, LDAP, Active directory, ......

Posted On Tuesday, August 14, 2007 10:51 AM | Comments (0)

Synching My Blog with Twitter

Continuing on with RSSBus scripts showing how to pipe Google Calendar to Twitter and Flickr to Twitter, here's my last Twitter RSBScript. Here's a script to pipe any existing RSS feed to Twitter. I wanted to sync my blog with my twitter, so now everytime I post a new blog entry, it will be added to my Twitter status. Here's the url: http://www.textbox1.com/app... blog_url=http%3A%2F%2Ffeeds... &twitter_password=mypas... &twitter_user=mytwitter... ......

Posted On Monday, August 13, 2007 3:19 PM | Comments (0)

Worst IT Excuses

From Bill Ryan, from unknown: It works on my machine It doesn't matter because no one will ever do that Users like it the way it is I don't write any bugs It'll be fixed in the next release It'll be ready on Monday, we just need to build the setup package The spam filter ate it A little more RAM will fix your performance problem You can't do that because it's a security risk The database is slow because it's too normalized I've heard a few of these before. Also there's: - It'll be ready on Monday, ......

Posted On Thursday, August 9, 2007 4:55 PM | Comments (3)

Flickr -> Twitter

To illustrate what I mentioned in the previous post about how swapping out one connector for another to achieve a completely different task would be very simple - I did just that. I noticed that Dave Winer has been working on some sort of Flickr->Twitter app. I changed about 4 lines of code in the Gcal_to_Twitter RSBScript to make it into Flickr_to_Twitter. In the updated script, all I did was change the call to gcalSearch to a call to the atom feed of my Flickr photos. Then I do a quick check ......

Posted On Thursday, August 9, 2007 4:52 PM | Comments (1)

TwitterMinder - Google Calendar to Twitter

UPDATE: For full TwitterMinder documentation, see this TwitterMinder article. In my last two posts I mentioned my recent introduction to Twitter (after having watched so many people blab about it for the past few months). So today I went ahead and published my Google Calendar to Twitter RSBScript, and gave it the name TwitterMinder: TwitterMinder will check your Google Calendar for events that are occuring in the next hour, and if it finds any, they will be automatically submitted to your Twitter ......

Posted On Thursday, August 9, 2007 12:38 PM | Comments (9)

Google Calendar to Twitter

A few months ago, Charlie pointed out how it might be useful to have a script that would automatically post Google Calendar events on Twitter. Then he found someone that had already done it. Well, at the time I filed a note to do this with RSSBus - but then I got busy and never got to it - until today! :) Let me say that I did the RSSBus script first, and then I looked at how the other guy did it (he used a 200 line php script + Yahoo Pipes). Here's my roughly 20 line RSB script (using the RSSBus ......

Posted On Wednesday, August 8, 2007 4:26 PM | Comments (2)

Twittering around

If you are using Twitter, let me know so I can follow you. Yep, I'm on Twitter now, finally. I decided to give it a shot and see what all the hoopla is about. Is it really that great? We'll see. While I'm checking it out - I decided to look at its API and look into whether or not I should throw together a Twitter connector for RSSBus. The API is very compact - simple and to the point. All simple HTTP get and put. All of the API methods return data in several formats - it looks like all of the gets ......

Posted On Wednesday, August 8, 2007 1:27 PM | Comments (0)

SQL Server to Excel

With RSSBus, right out of the box you can run a SQL query on an Excel sheet using the excelQuery operation. If you create a little RSSBus script, you can also perform queries on SQL Server, Access, or other database sources and pipe the results into Excel: <!--hard-code some inputs to sqlQuery: --><rsb:set item="myinput" attr="query" value="SELECT TOP 20 * FROM Customers" /><rsb:set item="myinput" attr="conn" value="Data Source=localhost\\SQLEXPRES... Catalog=Northwind;" /> ......

Posted On Tuesday, August 7, 2007 4:47 PM | Comments (0)

Winsock Error 10054

Winsock error 10054 is "Connection reset by peer", or "An existing connection was forcibly closed by the remote host". The error means exactly what it says - the remote host closed the connection unexpectedly. This happens when a connection is aborted, and there is no tcp disconnection handshake (fin, fin ack, ack) , but instead a rst (reset) flag is sent. A reset flag aborts the connection, and can be sent when: - The device is suddenly stopped, rebooted, or loses its network connection. - The device ......

Posted On Tuesday, August 7, 2007 12:18 PM | Comments (10)

LDAP - Change Group Membership

In my previous posts about LDAP group membership, I've talked about how to get a list of groups, how to search for a particular groups members, and how to search for what groups a particular user belongs to. Up next: how to change group membership. To add or remove a user from a group, you need to modify the "member" attribute of the group itself. To do this we'll use the set-ldap cmdlet of NetCmdlets. Add a user to a group: To add a user to a group, set the DN parameter of set-ldap to the DN of ......

Posted On Monday, August 6, 2007 10:22 AM | Comments (2)

LDAP - Search for What Groups a Particular User Belongs to

In the last LDAP series post, I mentioned how to search for the members of a group. Now the opposite, here's how to search for what groups a particular user is a part of: To do this search, all I do is form a search filter that is searching for all groups that has a particular member in it. So really this is a slight alteration of the search for all groups. PS C:\> get-ldap -server testboy -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(member=CN=Lance Robinson,CN=Users,DC=JUNGLE... ......

Posted On Friday, August 3, 2007 12:51 PM | Comments (1)

Amazon Flexible Payments Service

It looks like Amazon has a new web service, FPS - the Amazon Flexible Payments Service. This one will allow developers to build Amazon payment functionality directly into their applications. The service looks to be similar to PayPals ExpressCheckout. FPS OverviewFPS Technical Docs ......

Posted On Friday, August 3, 2007 9:19 AM | Comments (1)

EDI AS2 Adapter for BizTalk Tutorial

Spencer Brown published a tutorial, "AS2 Adapter for Microsoft BizTalk" that walks through installing the /n software BizTalk Adapters and configuring send and receive ports for the included AS2 adapter. Technorati Tags: EDI, AS2, BizTalk Share this post : digg it ......

Posted On Thursday, August 2, 2007 5:12 PM | Comments (1)

LDAP - Search for Group Members

More with the ldap cmdlets in NetCmdlets, here's how to list the members of a particular group. I used the get-ldap command shown in the last post to get a list of all my admin groups, and save it in a $groups collection: PS C:\> $groups = get-ldap -server myserver -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree -search "(&(objectclass=group)(... PS C:\> $groups Host DN ---- -- testboy CN=Administrators,CN=Builti... testboy CN=Schema Admins,CN=Users,DC=JUNGLE testboy ......

Posted On Thursday, August 2, 2007 9:31 AM | Comments (3)

LDAP - Search for Active Directory Groups in PowerShell

NetCmdlets doesn't have a long list of Active Directory cmdlets for PowerShell. Instead, it has 2. And they aren't AD specific - they just implement the LDAP protocol itself so they can work with any LDAP server, Active Directory or not. Two cmdlets are all that is needed to make common tasks simple. One for setting values (set-ldap), and one for getting values (get-ldap). Here's how I can retrieve a list of all the "admin" groups: PS C:\> get-ldap -server myserver -cred $mycred -dn dc=JUNGLE ......

Posted On Wednesday, August 1, 2007 10:28 AM | Comments (0)

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski