Module review

I’ve recently written a module that has a function to identify the VHD path of a given VM disk.
The module is available at [url]http://gallery.technet.microsoft.com/scriptcenter/SBTools-module-adds-38992422[/url]
I was wondering if anyone can review it, or if you have any suggestions or comments about it.
Thanks

Hello,

There could be errors on my computer however these are things i just noticed on my test

Install-SBTools

  1. Threw exception for copy-item - Cannot find path ‘c:\windows\system32\SBTools.psm1’ because it does not exist
    • I have seen this before where it is looking at where you are on the command prompt instead of considering the location where the file was run from.
    • I think there is a more elegant way of doing this but the idea would be, you instruct to have this placed in a particular place like ‘c:\install’ for example and then set the directory to that location so it finds the files to be able to install them.

As long you are in the right directory that installation part works fine

  1. The Actual Script itself unfortunately i couldn’t actually get it retrieve anything back for me, no errors just nothing back. I’ll do abit more digging to see why i couldn’t get anything back. If i do get-VM i can see all my VM’s there, so something strange going on.

Okay figured out what’s wrong - apologises its not your fault its mine - I didn’t have remoting enabled on the end point computer and i checked your log to find that out.

Otherwise I ran the script and it worked well and pulled back the drive letter and VHDPath

Yep, I assume people will run the installer from the folder where they extracted the .rar file, but that’s good observation, I added directions to ensure my assumption is communicated…

The function is designed intentionally to return no output in case of errors like unable to connect to VM or drive not found. To see output details use the -verbose switch…