I am currently working on a script that uses Luc D's Get-FolderByPath function to allow me to deploy a VM to a specific folder in my vSphere environment. However, when I run the code I am getting the following error even though the VM is created correctly -
Get-Inventory: Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and the try the command again.
The code is attached. Being new to PowerCLi everything appears to be proper so I am not seeing why the error is being thrown as the values should be set by the parameters that are defined.
Thank you for your assistance with this and helping me to become more proficient.
The code in the Word document seems to be garbled up.
Could you perhaps attach your code in a flat text file ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The code in the Word document seems to be garbled up.
Could you perhaps attach your code in a flat text file ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Luc D,
Apologies for that. However, I actually resolved this. I had a trailing / in the path for the -Path parameter which of course threw everything off.
Thank you for more amazing code to help me achieve my goals.