Trevor Sullivan's Tech Room

Minding the gap between administration and development

Posts Tagged ‘software’

PowerShell: List Strongly Typed Names in Global Assembly Cache

Posted by Trevor Sullivan on 2011/12/30

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:


Unfortunately Microsoft recommends against using that static method, and recommends use of other methods like:


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 the rest of this entry »


Posted in .NET, powershell, scripting, tools | Tagged: , , , , , , , | 6 Comments »

Checking Status of a Windows 7 System Image

Posted by Trevor Sullivan on 2011/12/30

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 to proceed when the backup has completed, you can run this command line:

wbadmin.exe get status

This program will "block" (continue running) and report progress, as a percentage, until the backup has completed.


Posted in tools | Tagged: , , , , , , , | Leave a Comment »

Links to Interesting Stuff

Posted by Trevor Sullivan on 2011/07/23

Updated on 2011-08-03

Here are some links to interesting blogs, software, and other random tidbits!

Read the rest of this entry »

Posted in Uncategorized | Tagged: , , , , , | Leave a Comment »

Links to Interesting Stuff

Posted by Trevor Sullivan on 2010/11/01

Updated on 2010-11-01 – A weekly Podcast with topics revolving around Microsoft PowerShell – The official Microsoft Scripting Guys blog


BitKinex – FTP, SFTP, WebDAV client for Windows XP/Vista/7

NuPack – NuPack is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development.

PowerGUI VSX – Visual Studio Extensions for PowerShell

PHP Manager for IIS – PHP Manager for IIS is a tool for managing one or many PHP installations on IIS 7 and IIS 7.5 servers. – A free system monitor I happened across – A cool Windows 7 taskbar enhancement. Allows you to create stacks of programs to launch from the taskbar. – A PowerShell-based Workflow tool – A somewhat outdated, but cool and free PowerShell monitoring utility – PowerShell Community Extensions. Adds a number of useful cmdlets to PowerShell. – Available as part of the Windows 7 Resource Kit, the PowerShell Pack contains 10 modules to help you do more with PowerShell – A free PowerShell integrated development environment (IDE) from Quest Software

Free .NET Libraries

oauth-dot-net – A .NET library which provides full OAuth consumer and provider support.

Twitterizer – A .NET library for Twitter folk. Implements OAuth. Requires .NET 3.5+

DNS Client .NET – Perform simple as well as advanced DNS lookups from .NET code against any DNS server.

Punycode / IDN .NET – Punycode (and de-code) domain names containing international (non-english) characters in .NET code.

Packet.Net – High performance .Net assembly for dissecting and constructing network packets such as ethernet, ip, tcp, udp etc.

SharpPcap – SharpPcap is a cross-platform packet capture framework for the .NET environment, based on the famous pcap / WinPcap libraries

Pcap.Net – Pcap.Net is a .NET wrapper for WinPcap written in C++/CLI and C#.

DotNetOpenAuth – DotNetOpenAuth is a C# library that adds OpenID 2.0 Provider and Relying Party, OAuth Consumer and Service Provider, and InfoCard Selector support to your web site

OpenTK – The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL.

Visifire – A free, animated charting library for Microsoft .NET

Dundas Charts – A very powerful .NET charting solution

dot-net-transitions – A library for animated UI transitions for .NET

HTML Agility Pack – A .NET code library that allows you to parse "out of the web" HTML files.

Blogs – The official Windows PowerShell blog – The Windows Management Infrastructure blog – Excellent PowerShell blog (Kirk Munro) – Hal Rottenberg’s blog (MVP) – Richard Siddaway’s blog (MVP) – A PowerShell blog by Andy Schneider – Keith Hill’s blog (MVP) – Alex Verboon’s blog – Interesting posts about IT – Shay Levy’s blog (PowerShell MVP) – Karl Prosser’s PowerShell blog (MVP) – Karl Mitschke’s PowerShell blog – Dennis Delimarsky’s developer blog – Anonymous PowerShell blog – Cool coding blog (Rafael Rivera)

Posted in scripting, tools | Tagged: , , , , , | Leave a Comment »

New 1E WakeUp iPhone App

Posted by Trevor Sullivan on 2010/08/18

1E has recently gotten a new, awesome application approved on the Apple AppStore called 1E WakeUp, or 1E Remote WakeUp!

Cool, what does it do?

This app enables iPhone, iPod Touch, and iPad users to remotely wake up their corporate computers, on networks where the 1E Power & Patch Management solution (NightWatchman & WakeUp) has been implemented. Most workstations, when configured properly, can be awoken from most ACPI power states, including S5 (shutdown), S4 (hibernate / suspend to disk), and S2-3 (standby / sleep).

Soooo why do I need it?

Sometimes it’s easier to respond to questions with questions!

Do you have an iPhone and a computer at the office that you sometimes need to access from home? Are you an IT administrator, or helpdesk user, that may need to wake up corporate computers to work on remotely (from home or afar)? If you answered “yes” to either of these questions, then it’s very possible that the 1E WakeUp iOS app will be of great use to you!

If you’re an end-user of corporate-owned device, 1E WakeUp can help keep you more productive, by remotely waking up your corporate PC, so you can use it whenever you need it available!

If you’re an IT administrator, or in helpdesk support, you can use 1E WakeUp to remotely power on computers, so you can work on them from anywhere around the world! Maybe you could even talk your manager into letting you work from the beach in Hawaii!! 🙂

Sounds awesome! How do I get it?

Open the AppStore on your iOS-powered device, and search for “1E WakeUp” The only result you should get (at the time of this writing), is the 1E WakeUp app.

When was it published?

The “Post Date” on the Apple AppStore shows that the application was published on August 6th, 2010.

How large is the download?

The AppStore shows the size of the 1E WakeUp app is 706 kilobytes (KB).

How old do I have to be to use it?

The AppStore shows that the 1E WakeUp app is safe to use for 4 years and older.  🙂

1E WakeUp iOS Guide


This guide assumes that you have:

  • Implemented 1E WakeUp in your corporate network environment OR
  • Implemented 1E WakeUp in a lab environment
  • An iOS-powered device, such as an Apple iPhone, iPod Touch, or iPad
  • Your iOS device has access to your WakeUp server and can authenticate to AD — usually satisfied by corporate Wifi or VPN access
  • You know the name (or part of the name) of your computer at the office

Installing the App

  1. Visit the AppStore
  2. Go to the Search page
  3. Type “1E WakeUp” in the search box and hit Search

    AppStore Search Screen

    AppStore Search Screen

  4. Select the 1E WakeUp app

    AppStore Search Result

    1E WakeUp AppStore Search Result

  5. Hit the “FREE” / Install button

    Install 1E WakeUp App

    Install 1E WakeUp App

  6. Type your iTunes password

After following these directions, you should have the 1E WakeUp App on your iOS device’s home screen!

App Setup

After you download the 1E WakeUp app, launch it from your home screen. By default, the app will be “connected” to a demo server, which will let you sample the functionality of the app, using a few, fake client machines. A small bit of configuration is required, but you’ll be up and running in no time!

On the app’s main screen, hit the Preferences button.

1E WakeUp App - Main Screen

1E WakeUp App - Main Screen

You’ll see the demo server listed under the Servers heading, but we want to add our own server, so hit “Add Server

1E WakeUp App - Preferences Screen

1E WakeUp App - Preferences Screen

Type the fully qualified DNS name of your 1E Web WakeUp server in the Server field. If you have 1E Web WakeUp installed on a server separate from your 1E WakeUp Server, you’ll need to ensure that you enter the former! In the Account field, enter your domain and username in the format: <domain>\<username>. If you’re an end user, and are unsure of the domain name, check with your administrator or helpdesk. The Password field ought to be self-explanatory, but if not … enter your password here 🙂 If your Web WakeUp web service is configured to use TLS, click the HTTPS button. If you’re unsure of this setting, try HTTP; If it doesn’t work, then try HTTPS.

1E WakeUp App - Server Settings Screen

1E WakeUp App - Server Settings Screen

Now just click the Save button, and you’re all set to start waking up computers!

Waking up Computers

Now that you’ve got the 1E WakeUp App configured to talk to the server, you can start waking up computers! Let’s start out by going back to the main screen of the WakeUp App. If you know your exact computer name, select the Wake Up by Name option; If you only know part of your computer name, or aren’t sure, you can select Wake Up Search, which will let you type any part of the computer name to find it.

1E WakeUp App - Main Screen

1E WakeUp App - Main Screen

Let’s do a search for now, even though we’re using the whole computer name

1E WakeUp App - Computer Search Screen

1E WakeUp App - Computer Search Screen

As you can see from the above search, we get a single client back in our search results

1E WakeUp App - Computer Search Results Screen

1E WakeUp App - Computer Search Results Screen

If we click on the computer, it takes us to the wake-up page, and attempts to wake the computer

1E WakeUp App - WakeUp Machine

1E WakeUp App - WakeUp Machine

Or if the computer is already awake, then it simply tells us that, that is the case

1E WakeUp App - WakeUp Machine (Already awake)

1E WakeUp App - WakeUp Machine (Already awake)

Once we’ve woken the computer, we have the option Register Machine which lets us set our default machine on the app’s main screen. This saves us having to manually type the computer name, or search for it in the database, every time we want to wake it up.

Once you’ve successfully woken your computer, you should be able to access it using your normal remote control routine. Usually, this would involve establishing a VPN session to your corporate network and using Remote Desktop (built into Windows).


This article has discussed the features of the 1E WakeUp app on the Apple AppStore. Remember that, in order to use this application, you’ll need to have the 1E NightWatchman & WakeUp solution implemented in your enterprise IT environment. Check with your IT staff, to see if this functionality is available, and if not, ask them if they can get it! 🙂

Until next time …!


Trevor Sullivan

Posted in Apple, tools | Tagged: , , , , , , , , , , , , , | 2 Comments »

ccmsetup.exe: Trailing slash in “Source” parameter

Posted by Trevor Sullivan on 2010/08/05

Hello everyone!

Tonight, while I’m traveling in Houston, Texas, I wrestled with ccmsetup.exe for a little while. I was working on getting a ConfigMgr vNext client agent installed on a Windows 7 Ultimate virtual machine, and kept getting a message in my ccmsetup.log saying “Source <path> is inaccessible.


A little bit about %~dp0

Now, whenever I build installer packages for software, whether to run manually, or distribute through ConfigMgr, I generally wrap the commands inside a simple batch file, so I don’t have to constantly type out the entire command, or forget what a particular parameter should be set to.

Because I write lots of simple batch files, and use these packages from both UNC paths, as well as local installs, I use a nifty batch trick: %~dp0. Without going into too much detail, if you use %~dp0 in a batch file, it will reference the folder in which the batch file resides, including a trailing slash. For example, if you want to run a MSI package from a local or UNC path, you could write a dynamic batch file like so:

msiexec /i “%~dp0MyPackage.msi” /quiet

In the above command, the double quotes will take care of any spaces in the path, and the %~dp0 will reference the folder path in which the batch file itself resides. This command also assumes that a Windows Installer package called “MyPackage.msi” resides in the same folder alongside the batch file. Using %~dp0 is great, because no matter where I copy an entire package folder, I always know that I can execute a batch file, and it will use appropriate relative pathing to find the supporting files necessary to run the command.

Anyway, that’s enough history about %~dp0 and why I use it!


The Trailing Slash Issue

Installing the ConfigMgr client is generally quite simple: you can simply execute ccmsetup.exe by double-clicking it, or invoking it, with no parameters from a script. In this circumstance, however, I needed to specify the source folder for where to get the files, otherwise ccmsetup.exe was going to point to my ConfigMgr 2007 management point, rather than the ConfigMgr vNext management point that I wanted it to get the files from. Instead of using the /MP parameter, I elected to simply point ccmsetup.exe to the specific folder where the source files resided (on the ConfigMgr network share).

Naturally, since I was building my agent install batch file right inside the client folder on the site server (\\vnext01\sms_vnx\client), I simply used “%~dp0” to point ccmsetup.exe to its own folder (which was a UNC path). The command I placed into the batch file was the following:

“%~dp0ccmsetup.exe” /retry:1 /source:”%~dp0″ FSP=vnext01.ts.loc

Upon execution of this batch file, is when I experienced the “inaccessible source” error message in ccmsetup.log, as described in my opening paragraph. After encountering this issue, I experimented with a number of different permutations of the command line, none of which worked really. I finally realized that, as best I can tell, ccmsetup.exe appeared to be incorrectly parsing the value passed to the /source parameter. If you include a trailing slash on the <path> you pass to /source, then ccmsetup.exe will actually use the remainder of the command line as the <path>. This is very bad!

In short, if you want ccmsetup.exe to succeed at finding its source files, you must not include a trailing slash on the value you feed into the /source parameter!

The only scenario I have not yet tested, is passing a <path> to /source, that has a trailing slash, but does not have double-quotes around the path. I always recommend using double-quotes for any command-line value that may have spaces in it, so I would not really even consider this scenario, other than for the sake of testing.



Well, I hope this has given some of you some insight into a potential problem, and maybe even saves you a few gray hairs by finding this on Google, instead of stressing over what you are doing wrong. It appears to be a small software bug, and I’m somewhat surprised that no one else seems to have encountered it, but there’s a first time for everything, right?

If you have any feedback, or would like to ask a question, feel free to leave a comment on this article, or e-mail me directly at


Update: If you’d like to help out by recreating the issue, posting your comments, upvoting the bug report on Microsoft Connect, that would be fabulous! Make sure you log into Microsoft Connect, join the ConfigMgr vNext Beta Program, and then click the following link:

If you can reproduce the issue, make sure to click the “I can too” link on the above page.

Posted in configmgr, ConfigMgr vNext, fixes | Tagged: , , , , , , , , , , | Leave a Comment »

iTunes once again breaks my apps

Posted by Trevor Sullivan on 2010/06/30

So after I upgraded to iOS 4, it broke all the links to the music I had tirelessly copied to my 64GB iPod Touch 3G. In other words, I had about 40GB of Data that was left useless on the device, and since I was traveling internationally, I had no way of restoring my music to my device for listening on the plane ride home.

So I get home finally, and clean up the iPod by deleting the iTunes_Control folder off of it, using iPhone Browser. Once the massive data blob was cleaned off, I figure out that I can drag-drop MP3 files onto iTunes (without importing it into iTunes), and have it copy the music to my device. This is ideal, since I don’t want to go through the normal “check off all the music you want “sync’d” and run a sync” process that makes me really dislike iTunes. I copied a few albums over using this method, and all was fine.

Well, just this afternoon, I went to launch an app on my iTouch, it starts, and then exits immediately! I knew it! As soon as I let iTunes touch my iPod, it broke all my app authorizations! The last time I had a problem like this, I solved it by authorizing my computer in iTunes, sync’ing the apps to my computer and then deauthorizing the computer again.

Fix your damn rights management, Apple. I own these apps; don’t you dare deny me from using them.

Update: Sync’ing my apps to iTunes didn’t fix the issue. I tried following this video which also didn’t work.

Posted in fixes | Tagged: , , , , , , , , , , , | Leave a Comment »