I am at a loss, I noticed a script I use to deploy new VMs seems to have started to fail to run automatically so I started to dig into it. If I tell the script to run all it shows is this:
[root@vmware-util ~]# pwsh /home/scripts/actions-regular/Automation/VM-DeploymentBuild1.ps1
Exception: The VMware.ImageBuilder module is not currently supported on the Core edition of PowerShell.
If I take the content of the script and paste it into powershell it works fine. I am not sure what I am missing today. Here is the version I am running in case that is a problem:
PS /root> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware PowerCLI 12.2.0 build 17538434
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.3 build 17838947
VMware Cis Core PowerCLI Component PowerCLI Component 12.3 build 17839331
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.3 build 17839688
Assuming that script is using the vmware.imagebuilder module, you'll need to run that particular script in "Windows Powershell" with vmware.powercli module installed.
Powershell Core is OS-agnostic version that not all modules have been ported to.
Assuming that script is using the vmware.imagebuilder module, you'll need to run that particular script in "Windows Powershell" with vmware.powercli module installed.
Powershell Core is OS-agnostic version that not all modules have been ported to.
That is the confusing part, if I copy all the content of the script and paste it into the powershell window it all works, no errors.
I uninstalled some of the modules that I don't need and now it works. Thank you for looking into this still!
Just a warning for future readers of this thread.
It is highly unlikely that uninstalling a module fixes the issue that the VMware.ImageBuilder module is not supported on PowerShell v6 or higher 🤔
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Update: since PowerCLI 13.0 the ImageBuilder module is supported on all PS platforms and versions.
See PowerCLI 13 is now GA!
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We are seeing that even with PowerCLI 13.1 that ImageBuilder still requires Windows PowerShell.