Module review

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Sam Boutros Sam Boutros 2 years, 4 months ago.

  • Author
    Posts
  • #17778
    Profile photo of Sam Boutros
    Sam Boutros
    Participant

    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

  • #17779
    Profile photo of Adnan Rashid
    Adnan Rashid
    Participant

    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

    2. 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.

  • #17781
    Profile photo of Adnan Rashid
    Adnan Rashid
    Participant

    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

  • #17790
    Profile photo of Sam Boutros
    Sam Boutros
    Participant

    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..

You must be logged in to reply to this topic.