List Execution Policies
Get-ExecutionPolicy -List
Set Excecution Policy (Requires Running terminal as Admministrator)
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope LocalMachine
Return Excecution Policy (Requires Running terminal as Admministrator)
Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope LocalMachine
What your command promt will say if you do not have the correct permissions
PS C:\Users\<yourUser>> Import-Module VMware.ImageBuilder
Import-Module : File
C:\Users\<yourUser>\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\12.2.0.17531155\VMware.VimAutomation.Sdk.psm1 cannot
be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module VMware.ImageBuilder
+ ~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module VMware.ImageBuilder
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
Install-Module -Name VMWare.PowerCLI -Scope CurrentUser
Get-EsxImageProfile
Export-ESXImageProfile -ImageProfile "<profile from get image profile>" -ExportToBundle -filepath <filename>
Ex: Export-ESXImageProfile -ImageProfile "ESXi-7.0U2d-18538813-standard" -ExportToBundle -filepath ESXi-7.0U2d-18538813-standard.zip
Add-EsxSoftwareDepot <created zip filename>
Ex: Add-EsxSoftwareDepot .\ESXi-7.0U2d-18538813-standard.zip
Add-EsxSoftwareDepot <path to downloaded ZIP>
Ex: Add-EsxSoftwareDepot .\ESXi700-VMKUSB-NIC-FLING-34491022-component-15873236.zip
Ex: Add-EsxSoftwareDepot .\Net-Community-Driver_1.2.0.0-1vmw.700.1.0.15843807_18028830.zip
New-EsxImageProfile -CloneProfile "<downloaded image profile name>" -name "<name of new profile>" -Vendor "<whatever vendor name you want>"
Ex: New-EsxImageProfile -CloneProfile "ESXi-7.0.0-15843807-standard" -name "ESXi-7.0.0-15843807-USBNIC" -Vendor "virten.net"
Ex: New-EsxImageProfile -CloneProfile "ESXi-7.0U2d-18538813-standard" -name "ESXi-7.0U2d-18538813-standard-CommunityNics" -Vendor "Curious Tech"
<opened zip file>\metadata\vibs\<software package name>--<numbers>.xml
Ex: Net-Community-Driver_1.2.0.0-1vmw.700.1.0.15843807_18028830\metadata.zip\vib\net-community--1173369167022138283.xml
Add-EsxSoftwarePackage -ImageProfile "<your image profile>" -SoftwarePackage "<software package name>"
Ex: Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U2d-18538813-standard-CommunityNics" -SoftwarePackage "net-community"
Export-ESXImageProfile -ImageProfile "<your image profile>" -ExportToIso -filepath <user created name of ISO>
Ex: Export-ESXImageProfile -ImageProfile "ESXi-7.0.0-15843807-USBNIC" -ExportToIso -filepath ESXi-7.0.0-15843807-USBNIC.iso
Ex: Export-ESXImageProfile -ImageProfile "ESXi-7.0U2d-18538813-standard-CommunityNics" -ExportToIso -filepath ESXi-7.0U2d-18538813-standard-CommunityNics.iso
Export-ESXImageProfile -ImageProfile "<your image profile>" -ExportToBundle -filepath <user created name of ZIP>
Export-ESXImageProfile -ImageProfile "ESXi-7.0.0-15843807-USBNIC" -ExportToBundle -filepath ESXi-7.0.0-15843807-USBNIC.zip
Export-ESXImageProfile -ImageProfile "ESXi-7.0U2d-18538813-standard-CommunityNics" -ExportToBundle -filepath ESXi-7.0U2d-18538813-standard-CommunityNics.zip