Last active
January 2, 2021 04:17
-
-
Save gowatana/f606b676050f7dcb0de33a06b4825998 to your computer and use it in GitHub Desktop.
ESXiのオフラインバンドルから、ISO イメージファイルをエクスポート。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# PowerCLI> .\export_esxi-offline-bundle_to_iso.ps1 <Offline_Bundle.zip> <Export_Dir> | |
$offline_bundle_path = $args[0] | |
$export_dir = $args[1] | |
Add-EsxSoftwareDepot $offline_bundle_path | Out-Null | |
Get-EsxImageProfile | where {$_.Name -notmatch "s-standard|-no-tools"} | % { | |
$img_profile = $_ | |
$img_profile_name = $img_profile.Name | |
$iso_file_name = Join-Path $export_dir ($img_profile_name + ".iso") | |
Write-Host "Export ISO File: $iso_file_name" | |
Export-EsxImageProfile $img_profile -ExportToIso -FilePath $iso_file_name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PowerCLI 10.x でも大丈夫なはず。