Forcibly installing the Android USB driver in Windows 7

If you are an Android mobile device user, with a tablet or phone, you may at some point desire to connect it to your Windows 7 computer over USB. Generally we do this so that we can use the debug interface with software utilities such as ADB.exe (Android Debug Bridge), which is included with the Google Android SDK.

Upon first connecting your Android device to your Windows 7 system, you might realize that there is no device driver available out-of-the-box to allow the debug interface to work properly. When you open Device Manager (devmgmt.msc) or Computer Management (compmgmt.msc) – which contains the Device Manager MMC snap-in – you might notice a generic icon representing an “Android Device” under the “Other Devices” category. Basically, this means that Windows 7 recognizes the presence of the device, but doesn’t know how to “talk” to it. To get Windows to talk to our Android device, we must install the Google USB driver.

Read moreForcibly installing the Android USB driver in Windows 7

PowerShell ISE v3: Keyboard Shortcut to Close Script Tab

Background

In the PowerShell Integrated Scripting Editor (ISE) v3, the common [Ctrl] + W keyboard shortcut is mapped to the “Close PowerShell Tab” action. Personally, I would like to see different behavior, whereby that shortcut is used to close the active script tab until there are none left, at which point it may then close the active PowerShell tab. Unfortunately that’s not how it works, and it probably won’t get changed for the final release of PowerShell v3. Either way, I did file a bug report for this issue on Microsoft Connect.

There is, in fact, a keyboard shortcut mapped to the “Close Script Tab” action, however it’s a keyboard shortcut that I’m personally not very fond of. The [Ctrl] + [F4] shortcut is rather convoluted, and although it may have a legacy in the Microsoft world, I find it to be very uncomfortable.

Read morePowerShell ISE v3: Keyboard Shortcut to Close Script Tab

PowerShell: Automate Windows Azure Service Bus queue creation

Microsoft Windows Azure Logo

One of the core services provided by the Windows Azure “cloud computing” platform is the ability to create first-in, first-out messaging queues. These queues are considered to be part of the Service Bus feature in Windows Azure. In some cases, it may be desirable to automate the creation of these queues, especially if there are a lot of them to create. By automating this process, rather than performing it manually, you can ensure consistency, repeatability, and speed.

Starting out with Windows Azure automation might lead you to download the official Microsoft Windows Azure cmdlets, or even the third-party Cerebrata Windows Azure module for Windows PowerShell. The latter module appears to have cmdlets that support queue creation, however the former (Microsoft) module does not. If you’d rather not spend the money on the Cerebrata module, can’t get your company to buy it for you, or you’d rather just stick to native Microsoft stuff, you’re still in luck. The Windows Azure .NET SDK 1.6 allows C# developers, and PowerShell script writers, to create queues using the provided .NET types!

Read morePowerShell: Automate Windows Azure Service Bus queue creation

PowerShell: Backup documents on Dropbox securely with encryption

Like many other people out there, you’re probably looking for a way to backup your documents regularly, reliably, and securely on some sort of central storage service. Dropbox is a great option for this, since they provide a fair amount of storage for free, and their annual cost for additional storage is pretty fair. Unfortunately, … Read morePowerShell: Backup documents on Dropbox securely with encryption

PowerShell: Prompt Function to Monitor Memory Usage

Have you ever wanted to monitor your memory utilization in a PowerShell instance, but may not want to continually issue commands to determine it? Introducing …… the PowerShell Prompt to monitor memory utilization!! function prompt { "$(‘{0:n2}’ -f ([double](Get-Process -Id $pid).WorkingSet/1MB)) MB> " } Here’s the result:

PowerShell: Move ConfigMgr Collections

Introduction If you work with Microsoft System Center Configuration Manager (SCCM / ConfigMgr) 2007 in any capacity, you probably are familiar with the concept of "collections" and how painful they can be to work with sometimes. The ConfigMgr console does not provide any method of moving a collection from one parent to another, and the … Read morePowerShell: Move ConfigMgr Collections

PowerShell: PowerEvents Module Update to 0.3 Alpha

If you haven’t already checked it out, I wrote and published a PowerShell module on CodePlex a little over a year ago. It’s called PowerEvents for Windows PowerShell, and allows you to easily work with permanent WMI (Windows Management Instrumentation) event subscriptions. Some folks may not be aware that I’ve also written comprehensive documentation on … Read morePowerShell: PowerEvents Module Update to 0.3 Alpha

PowerShell: List Strongly Typed Names in Global Assembly Cache

I dislike using deprecated commands or APIs when I know that there’s a more modern method of performing an action. I also generally prefer to use Windows PowerShell as a .NET scripting language, rather than constantly relying on cmdlets. To be sure, I use a balance of both concepts, since cmdlets can save a whole lot of coding a lot of the time.

Every time I want to load an assembly into PowerShell, the first thing that pops into my mind is using the LoadWithPartialName() method:
[cc lang=”powershell”][Reflection.Assembly]::LoadWithPartialName();[/cc]
Unfortunately Microsoft recommends against using that static method, as it is deprecated, and recommends use of other methods such as LoadFile() or Load() like:
[cc lang=”powershell”][Reflection.Assembly]::Load(StronglyTypedAssemblyName);[/cc]
In the interest of not breaking my conscience, I would like to use this method, but the problem then becomes that I have to constantly figure out what the strongly-typed name of the assembly I want is. To help solve this problem, I decided to write a PowerShell script that extracts information from the .NET assemblies in the Global Assembly Cache (GAC), since those are generally the most common ones I’ll need to reference.

Read morePowerShell: List Strongly Typed Names in Global Assembly Cache

Checking Status of a Windows 7 System Image

If you’re running Windows 7, you may periodically create a “System Image” which is essentially just a VHD backup of your system. When you invoke the task, you will be presented with a dialog box similar to the following, which shows the progress of the backup: If you are scripting something, and want your script … Read moreChecking Status of a Windows 7 System Image

HP ProLiant DL360 G7 Video Driver

I was looking for a video driver for the HP ProLiant DL360 G7 so I could import it into ConfigMgr for the purposes of deploying Windows Server 2008 R2 to them. Oddly enough, HP doesn’t list a video driver available for download on the driver download page for this system model. On one server, I noticed that the device name was "ATI ES1000,” and most of you are probably aware that the ATI brand name has been gone for some time, so this seemed a bit odd.

Read moreHP ProLiant DL360 G7 Video Driver