- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I uninstalled some of the modules that I don't need and now it works. Thank you for looking into this still!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are seeing that even with PowerCLI 13.1 that ImageBuilder still requires Windows PowerShell.