This topic contains 3 replies, has 2 voices, and was last updated by
August 5, 2014 at 1:56 am #17778ParticipantPoints: 240Rank: 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 http://gallery.technet.microsoft.com/scriptcenter/SBTools-module-adds-38992422
I was wondering if anyone can review it, or if you have any suggestions or comments about it.
August 5, 2014 at 2:44 am #17779ParticipantPoints: 0Rank: Member
There could be errors on my computer however these are things i just noticed on my test
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.
August 5, 2014 at 3:13 am #17781ParticipantPoints: 0Rank: Member
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
August 5, 2014 at 8:27 am #17790ParticipantPoints: 240Rank: 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..
The topic ‘Module review’ is closed to new replies.