When using Invoke-Command -ComputerName $nodes.ComputerName, write the scriptblock such that the computername is echoed with the result.
Tuesday, May 26, 2015
PowerShell Invoke-Command with -computername object/hash/array
When using Invoke-Command -ComputerName $nodes.ComputerName, write the scriptblock such that the computername is echoed with the result.
Monday, January 19, 2015
Published on GitHub
Not so much IT busy, as personal busy. Since I last posted here, we've added another family member (bringing our little home occupancy to 4), dealt with complex and frustrating work situations and survived to tell the tales.
I've also discovered github.com and found it to be interesting and perhaps even useful. As more and more cloud services become available, I like to try them out. Sometimes it's worthwhile, but mostly it's yet another user account to keep track of in my password manager of choice.
Regardless, I've now completed another version update to my code snippets program written in AutoIT called DLTray. Since I built the first version in 2007, it's been updated and modified, but over that period of time, I have found it to be an indispensable program, mostly because it does EXACTLY what I built it to do!
I'm trying to get into publishing some of my more useful PowerShell snippets, but, it's hard to pick and choose what might be useful for someone else. The practical reality is so that so much of what I use daily is contrived from other work posted on the web, it feels somewhat redundant to post my own, but that's exactly what I intend to do.
So, as I digest other's work and figure out how to put it to use, I will be posted useful bits of powershell to the other project I have on GitHub. Funny enough, those postings can be used with DLTray, so, in a way, it's all related.
If you have a need to post repetitive bits of information anywhere (of any kind code, comments, directions, etc, I highly recommend checking out DLTray. I know it's not perfect, but I can say honestly that it has saved me far more time that I've spent on it, so it's been worth it for me to develop it and continue customizing it for my daily use.
Perhaps as time passes, I can turn this into a code snippet sharing blog that can be used with DLTray over the long run.
If you come across it and find it useful, let me know. You'll find it a GitHub.com/danlemire.
Enjoy!
Saturday, August 03, 2013
Google Services
Tuesday, September 18, 2012
Social Media Explained
http://www.howtogeek.com/124758/social-media-explained-with-bacon/
Thursday, March 29, 2012
Verizon Westell 9100EM scheduled reboot
Today's cheap equipment is the Westell 9100EM. This device is fine, until you want to secure your wireless and turn on WPA. Apparently, using the WPA makes the device rather unstable. In my case, everything seems to work for about a week, and then my wife's MacBook can't communicate with our Xerox printer. Since she is a freelance Graphic Designer, printing is kind of important.
This led me to looking for a way to reboot the router on a regular basis to keep everything happy. But alas, the router software does not provide a way to schedule reboots.
The scripter in me says "I can write a script for that", so I went looking for the easiest way to get it done. The solution came in the form of AutoIt Script. (autoitscript.com). Since I know I'm probably not the only guy out there with this problem, I'll share. This script is written for firmware version 1.03.00.08.
$oIE = ObjCreate("InternetExplorer.Application.1")
If @error Then
MsgBox(0, "", "Error opening Internet Explorer: " & @error)
LogThis("IE Object Open Failed")
Exit
EndIf
$oIE.Visible = 1
$oIE.RegisterAsDropTarget = 1
$oIE.RegisterAsBrowser = 1
;steps to achieve reboot
;18 to advanced
;25 to Yes
;27 to reboot
Dim $routerAddress, $selectAdvanced, $selectReboot, $selectYes,$user,$pass
$user = "usernameGoesHere"
$pass = "passwordGoesHere"
$routerAddress = "http://192.168.1.1"
$selectAdvanced = "{TAB 18}{Enter}"
$selectYes = "{TAB 25}{Enter}"
$selectReboot = "{TAB 27}{Enter}"
$oIE.Navigate($routerAddress)
Sleep(5000)
Send($user & "{TAB}" & $pass & "{TAB}{ENTER}")
Sleep(5000)
Send($selectAdvanced)
Sleep(1000)
Send($selectYes)
Sleep(5000)
Send($selectReboot)
Sleep(5000)
Send($selectYes)
sleep(5000)
$oIE.Quit
$oIE = 0
The next step is to build the .exe and add it to task scheduler for whatever time frame you need. Enjoy!
Wednesday, June 22, 2011
Why are my google results X?
http://lifehacker.com/5814100/the-problem-with-your-google-search-results-and-what-you-can-do-about-it
Sunday, May 23, 2010
Great technology obsolescence
One of the greatest tragedies of new technology is the ever growing problem of legacy technology. Software, hardware, middleware, operating systems… you name it. Especially as it relates to computer technology.
Unfortunately, the continual push to better/newer technology is that the old technology slowly slips into oblivion. Take Apple computer for instance… OS X is a fantastic advancement beyond OS 9. But, what if I’m happy with OS 9? What about an iPod, can you still use that generation 1 iPod with your fancy new Apple MacBook Pro? NO CAN DO!
This week, the challenge is Windows Server 2003. It’s old hat now. The new technology is Server 2008 R2. W2K3 is so old now that it will enter extended support by Microsoft on July 17, 2010. That lack of support by Microsoft also means that any new hardware that comes out after that date will not likely be supported by any vendor.
But forget about support in a few months. There are problems with driver support even now. Broadcom, a network technology vendor for many companies in the server hardware business, is now only providing a packaged driver setup for their hardware. It seems, even their technology has outgrown Windows Server 2003.
Don’t get me wrong, the problem I referring to here can be dealt with. Though it’s not simple, easy or fun, the problem can be solved. That said, it serves my point well. You can keep it alive for a while longer, but the returns are ever diminishing because of vanishing vendor support. It gets progressively more difficult to do simple tasks.
I believe that this is one reason that businesses have so much angst over technology. Vendors have taught them well that if they commit to a given technology, that there is no guarantee how long that technology will be around to depend on.
I’ll give you another great example of technology rot: Television. Have you been to the electronics store lately? Did you see even one CRT television anywhere in the store? Not likely. Everything is flat. Everything is HD. If you’re at all like me, you probably have 10+ year old television that your still making work because, there’s absolutely nothing wrong with it. It’s not your fault that the TV stations don’t broadcast in the format the TV came out of the box with. It’s not your fault that someone came along and decided that they were too good for a square size program.
Eventually, we all give into the new technology, not necessarily because it’s better, but sometimes mostly because the old version was made obsolete by something newer or fancier, but not necessarily better.
I see it from the vendor side too. I develop software. I know what it means to release a new version that fixes everything about the old version that you just hated or tweaks that one little thing that didn’t quite work right. As a provider of anything, you strive to make your product better every time you release it. As you improve your product, your' expertise moves to the new product and away from the old because that is where you now spend all your time.
So, what’s the answer to the problem? I do know that some companies are better at it than others (this takes the Windows vs Apple argument to a whole new level). My goal is to design everything I build to work with new features as much as possible while preserving what’s old. I don’t always succeed, but at least I’ve thought about it and worked hard to keep things working for everyone for as long as possible.
Friday, January 01, 2010
New Toys, New Challenges
It never fails. Buy a new gadget and discover to your dismay that the practical implementation of the software that comes with said new toy, is not as good as the marketing people would have you believe.
In this case, we’re talking about the Logitech G940 H.O.T.A.S. joystick system. (HOTAS is Hands on Throttle and Stick, and in this case also includes rudder pedals).
So, I open up my new christmas present and discover that it works, but only partially. When trying to us the setup with a few older games, the rudder pedals didn’t work, instead, the Trim control for the rudder axis was being used instead. To make a potentially very long blog post short, here is the solution to that problem, at least in the case of Search and Rescue 4 and Vietnam MedEvac, and without having tested, bets are this will make Battlefield 1942 and several other games work as intended as well. The great irony is, that this can only be done by NOT using the provide Logitech device drivers for the G940, you have to use the generic HID game device drivers in order for this to work, because the Logitech drivers split the controllers into 3 separate devices, and that just makes this problem even worse.
After flipping through the Microsoft HID/joystick specs, and I found a way to reorder the inputs so that Vietnam MedEvac will work!
This is a registry hack, so, beware of the possible consequences. Never the less, windows allows you to override what control is assigned to a given input when used with DirectInput.
Steps for Windows 7 x64 (I haven't tried on XP, and I probably won't.
1.) Assign the generic HID/USB gameport device drivers to the G940. This makes it such that the G940 shows up as one device.
2.) open regedit.
3.) Search for G940
4.) you'll eventually come to the hive for HKEY_USERS\S-1-5-21-####-####\ System\CurrentControlSet\Control\ MediaProperties\PrivateProperties\Joystick\OEM\VID_046D&PDI_C287\
5.) Add a new key -> Axes
6.) Add new keys 0 through 6 (the key name is only a number 0,1,2,3,4,5,6)
7.) Add a binary value "Attributes" for each of the keys 0 thru 6
8.) Assign the value 01 81 00 00 01 00 30 00 the the attribute for 0
9.) Assign the value 01 81 00 00 01 00 31 00 the the attribute for 1
10.) Assign the value 01 81 00 00 01 00 32 00 the the attribute for 2
11.) Assign the value 01 81 00 00 01 00 33 00 the the attribute for 3
12.) Assign the value 01 81 00 00 01 00 34 00 the the attribute for 4
13.) Assign the value 01 81 00 00 01 00 35 00 the the attribute for 5
14.) Assign the value 01 81 00 00 01 00 36 00 the the attribute for 6
Now, this just keeps things as they are. So to swap the Z rotation axis, and the Z axis, we just need to swap the attribute assignment.
10.) Assign the value 01 81 00 00 01 00 35 00 the the attribute for 2
10.) Assign the value 01 81 00 00 01 00 32 00 the the attribute for 5
See what we did? Unplug the G940, wait a few seconds and plug it back in.
Go look at the properites in Game devices control panel now and see that Axis Z and Z rotation are swapped.
Similarly you could use this method for any of the axes that you want to change out.
Unfortunately, this only works when you don't use the Logitech drivers. But this also tells me that Logitech could easily fix this problem if they wanted to, all I had to do was take 30 minutes and read the WHDC documentation from Microsoft to move the axis assignments around.
Keep in mind however, that making this change could cause another game program to be mixed up on which axis goes where, but as I said, I have a suspicion that this will also fix the rudder pedals problem that I have with Battlefield 1942 as well.
Monday, May 04, 2009
Family Photography
Saturday, March 28, 2009
3D-based Captchas become reality | Crave - CNET
I'm fascinated by the idea of the CAPTCHA. Not the least of which, is the fact the CAPTCHA is an acronym. Because of the continuing risk/reward systems that all humans operate under, this convention is most probably here to stay.
What's funny to me regarding this 3D addition, is that in order to work around the system one of two things will need to happen.
1.) Spammers hire a person to do the work (and in that case, the CAPTCHA actually does exactly what it is intended to do: ensure a human is using the system.
2.) Computers are programmed to better recognize three dimensional objects from virtually any angle.
Option 2 is what intrigues me. I have to believe that someone is already working on this problem. Allbeit for use in robotics applications. If the spammers and hackers of the world decide to spend their time on option 2, the system will need to evolve again. Only this time we will have added the concept of computers recognizing three dimensional objects in the process. A process that we will need to have at somepoint in the future.
This has got me thinking, what other kinds of difficult computer recognition problems are out there? The best I can come up with at the moment is idiomatic expressions. The other problems I can come up with are already being worked on, or they've been solved (voice recognition and facial expressions recognition).
As a society we need to find ways to put value to the problems that we may hackers work on more valuable. These people spend loads of time working on a problem, so, let's give them a problem that really needs to be solved.