Extracting iso images with PowerShell

This little script is a rather naive implementation of an automated ISO-image extractor. The logic is as straightforward as a simple loop that goes through all the .iso files found within the $sourcefolder and extracts the contents to a corresponding folder under $outputfolder.

Also note that with a couple of adjustments here and there, you could also adjust the script to process Hyper V's VHD files.

That is because the actual meat of the script is on the Mount-DiskImage CMDlet, which natively supports both, iso and VHD image formats.
Please bear in mind that this is not much more than me toying with PowerShell, I am by no means an expert on the topic.

Meaning that there could be some tricky folder structures that might not play entirely well with the script. Nevertheless, it has worked for me and I feel that it's a bit nicer than having to issue all the commands through a mighty combination of piped commands, so that's that.

A couple of areas that could definitely be improved though, would be to have a more thorough check of the input parameters and better error handling of the usual IO-related hiccups e.g. file permissions, out of disk space, invalid characters in file name, file already mounted, etc

One last note is that I have found a little quirk when executing the script with PowerGUI - my PowerShell editor of choice - since it does not recognise any (virtual) mounted drives at runtime.
You can still edit and debug the script with PowerGUI, but for the actual extraction of files you will have to run it through the prompt.