PS C:\temp\powercli> echo $env:PSModulePath
C:\Users\XXXXX\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PS C:\temp\powercli> cd C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-ChildItem * -Recurse | Unblock-File
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-Module -Name VMware.PowerCLI* -ListAvailable
Directory: C:\Users\XXXXX\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 12.7.0.... VMware.PowerCLI
Script 12.6.0.... VMware.PowerCLI.Sdk
Script 12.6.0.... VMware.PowerCLI.Sdk.Types
Script 12.6.0.... VMware.PowerCLI.VCenter {Get-VIMachineCertificate, Get-VITrustedCertificate, Remov...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ap...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ce...
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-ChildItem * -Recurse | Unblock-File
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-Module -Name VMware.PowerCLI* -ListAvailable
Directory: C:\Users\XXXXX\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 12.7.0.... VMware.PowerCLI
Script 12.6.0.... VMware.PowerCLI.Sdk
Script 12.6.0.... VMware.PowerCLI.Sdk.Types
Script 12.6.0.... VMware.PowerCLI.VCenter {Get-VIMachineCertificate, Get-VITrustedCertificate, Remov...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ap...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ce...
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Install-Module VMware.PowerCLI -Scope CurrentUser
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-Module -Name VMware.PowerCLI* -ListAvailable
Directory: C:\Users\XXXXX\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 12.7.0.... VMware.PowerCLI
Script 12.6.0.... VMware.PowerCLI.Sdk
Script 12.6.0.... VMware.PowerCLI.Sdk.Types
Script 12.6.0.... VMware.PowerCLI.VCenter {Get-VIMachineCertificate, Get-VITrustedCertificate, Remov...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ap...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ce...
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Add-EsxSoftwareDepot C:\temp\VMware-ESXi-7.0U3c-19193900-depot.zip
Add-EsxSoftwareDepot : The 'Add-EsxSoftwareDepot' command was found in the module 'VMware.ImageBuilder', but the
module could not be loaded. For more information, run 'Import-Module VMware.ImageBuilder'.
At line:1 char:1
+ Add-EsxSoftwareDepot C:\temp\VMware-ESXi-7.0U3c-19193900-depot.zip
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-EsxSoftwareDepot:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Import-Module VMware.ImageBuilder
Import-Module : File C:\Users\XXXXX\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\12.7.0.20067606\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
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Import-Module VMware.ImageBuilder
WARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI a
better product. You can join using the following command:
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true
VMware's Customer Experience Improvement Program ("CEIP") provides VMware with information that enables VMware to
improve its products and services, to fix problems, and to advise you on how best to deploy and use our products. As
part of the CEIP, VMware collects technical information about your organization’s use of VMware products and services
on a regular basis in association with your organization’s VMware license key(s). This information does not
personally identify any individual.
For more details: type "help about_ceip" to see the related help article.
To disable this warning and set your preference use the following command and restart PowerShell:
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true or $false.
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
Perform operation?
Performing operation 'Update VMware.PowerCLI configuration.'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout
Seconds
----- ----------- ------------------- ------------------------ -------------------------- -------------------
Session UseSystemProxy Multiple Unset True 300
User
AllUsers
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Add-EsxSoftwareDepot C:\temp\VMware-ESXi-7.0U3c-19193900-depot.zip
Depot Url
---------
zip:C:\temp\VMware-ESXi-7.0U3c-19193900-depot.zip?index.xml
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> Add-EsxSoftwareDepot C:\temp\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
Depot Url
---------
zip:C:\temp\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip?index.xml
PS C:\Users\XXXXX\Documents\WindowsPowerShell\Modules> cd C:\temp
PS C:\temp> Get-EsxImageProfile
Name Vendor Last Modified Acceptance Level
---- ------ ------------- ----------------
ESXi-7.0U3c-19193900-no-tools VMware, Inc. 12/01/2022 0... PartnerSupported
ESXi-7.0U3c-19193900-standard VMware, Inc. 18/01/2022 0... PartnerSupported
PS C:\temp> New-EsxImageProfile -CloneProfile "ESXi-7.0U3c-19193900-standard" -name "ESXi-7.0U3c-19193900-NUC" -Vendor "sangiorgiosystems.net"
Name Vendor Last Modified Acceptance Level
---- ------ ------------- ----------------
ESXi-7.0U3c-19193900-NUC sangiorgiosy... 18/01/2022 0... PartnerSupported
PS C:\temp> Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U3c-19193900-NUC" -SoftwarePackage "net-community"
Name Vendor Last Modified Acceptance Level
---- ------ ------------- ----------------
ESXi-7.0U3c-19193900-NUC sangiorgiosy... 15/11/2022 1... PartnerSupported
PS C:\temp> Export-ESXImageProfile -ImageProfile "ESXi-7.0U3c-19193900-NUC" -ExportToISO -filepath c:\temp\ESXi-7.0U3c-19193900-NUC.iso
PS C:\temp> Export-ESXImageProfile -ImageProfile "ESXi-7.0U3c-19193900-NUC" -ExportToBundle -filepath c:\temp\ESXi-7.0U3c-19193900-NUC.zip
17 Get-ChildItem * -Recurse | Unblock-File
18 Get-Module -Name VMware.PowerCLI* -ListAvailable
19 Install-Module VMware.PowerCLI -Scope CurrentUser
20 Get-Module -Name VMware.PowerCLI* -ListAvailable
30 Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
31 Add-EsxSoftwareDepot C:\temp\VMware-ESXi-7.0U3c-19193900-depot.zip
32 Add-EsxSoftwareDepot C:\temp\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
33 cd C:\temp
34 Get-EsxImageProfile
35 New-EsxImageProfile -CloneProfile "ESXi-7.0U3c-19193900-standard" -name "ESXi-7.0U3c-19193900-NUC" -Vendor "sangiorgiosystems.net"
36 Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U3c-19193900-NUC" -SoftwarePackage "net-community"
37 Export-ESXImageProfile -ImageProfile "ESXi-7.0U3c-19193900-NUC" -ExportToISO -filepath c:\temp\ESXi-7.0U3c-19193900-NUC.iso
PS C:\temp>
Upload depot zip file to datastore
Log into ESXI instance
Run:
esxcli software vib update --depot=/vmfs/volumes/myDatastore/VMware-ESXi-7.0U1c-17325551-depot.zip