Remove redundant files;Apply MSI transform to Edge
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
c8a6d7b3fd
commit
34d79cedf8
@ -1,16 +0,0 @@
|
|||||||
|
|
||||||
# Convert to WIM:
|
|
||||||
# tasks:
|
|
||||||
# scripts:
|
|
||||||
# # Download .vmdk
|
|
||||||
# - ${bamboo.build.working.directory}\bamboo-specs\scripts\Copy-DatastoreItem.ps1 -VMName ${bamboo.vmname}-physical -VSpherePassword "${bamboo.vspherepassword}"
|
|
||||||
# # Remove unsupported key from descriptor file
|
|
||||||
# - Set-Content -Path "${bamboo.vmname}-physical.vmdk" -Value (Get-Content -Path "${bamboo.vmname}-physical.vmdk" | Select-String -Pattern 'ddb\.toolsInstallType.*' -NotMatch)
|
|
||||||
# # Convert to .vhd
|
|
||||||
# - Import-Module ${bamboo.build.working.directory}\bamboo-specs\scripts\MVMC\MvmcCmdlet.psd1
|
|
||||||
# - ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "${bamboo.vmname}-physical.vmdk" -DestinationLiteralPath "${bamboo.vmname}-physical.vhd" -VhdType DynamicHardDisk -VhdFormat Vhd
|
|
||||||
# - Remove-Item *.vmdk
|
|
||||||
# # Convert to .wim
|
|
||||||
# - $MountPath = New-Item -Path "$PWD\Mount" -ItemType 'Directory' -Force
|
|
||||||
# - Mount-WindowsImage -ImagePath "${bamboo.vmname}-physical.vhd" -Path $MountPath.FullName -Index 1
|
|
||||||
# - ${bamboo.build.working.directory}\bamboo-specs\scripts\New-WindowsImageJob.ps1 -ImageName 'Server2019' -SourceFolder $MountPath.FullName -DestinationFile "$PWD\diskimage.wim"
|
|
BIN
packer/binaries/MicrosoftEdgeEnterpriseX64.mst
Normal file
BIN
packer/binaries/MicrosoftEdgeEnterpriseX64.mst
Normal file
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
"vsphere_datacenter": "DeSchakel",
|
"vsphere_datacenter": "DeSchakel",
|
||||||
"vsphere_host": "bv11-esx.bessems.lan",
|
"vsphere_host": "bv11-esx.bessems.lan",
|
||||||
"vsphere_hostip": "192.168.11.200",
|
"vsphere_hostip": "192.168.11.200",
|
||||||
"vsphere_datastore": "Datastore04.NAS",
|
"vsphere_datastore": "Datastore01.SSD",
|
||||||
"vsphere_folder": "/Packer",
|
"vsphere_folder": "/Packer",
|
||||||
"vsphere_templatefolder": "/Templates",
|
"vsphere_templatefolder": "/Templates",
|
||||||
"vsphere_network": "LAN"
|
"vsphere_network": "LAN"
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"floppy_files": [
|
"floppy_files": [
|
||||||
"packer/preseed/Server2019/Autounattend.xml",
|
"packer/preseed/Server2019/Autounattend.xml",
|
||||||
"packer/preseed/Server2019/Sysprep_Unattend.xml",
|
"packer/preseed/Server2019/Sysprep_Unattend.xml",
|
||||||
|
"packer/binaries/MicrosoftEdgeEnterpriseX64.mst",
|
||||||
"scripts/Set-NetworkProfile.ps1",
|
"scripts/Set-NetworkProfile.ps1",
|
||||||
"scripts/Disable-WinRM.ps1",
|
"scripts/Disable-WinRM.ps1",
|
||||||
"scripts/Enable-WinRM.ps1",
|
"scripts/Enable-WinRM.ps1",
|
||||||
@ -119,6 +120,7 @@
|
|||||||
"floppy_files": [
|
"floppy_files": [
|
||||||
"packer/preseed/Server2019/Autounattend.xml",
|
"packer/preseed/Server2019/Autounattend.xml",
|
||||||
"packer/preseed/Server2019/Sysprep_Unattend.xml",
|
"packer/preseed/Server2019/Sysprep_Unattend.xml",
|
||||||
|
"packer/binaries/MicrosoftEdgeEnterpriseX64.mst",
|
||||||
"scripts/Set-NetworkProfile.ps1",
|
"scripts/Set-NetworkProfile.ps1",
|
||||||
"scripts/Disable-WinRM.ps1",
|
"scripts/Disable-WinRM.ps1",
|
||||||
"scripts/Enable-WinRM.ps1",
|
"scripts/Enable-WinRM.ps1",
|
||||||
@ -155,7 +157,7 @@
|
|||||||
"choco install -y dotnetfx",
|
"choco install -y dotnetfx",
|
||||||
"choco install -y 7zip.install",
|
"choco install -y 7zip.install",
|
||||||
"choco install -y sysinternals",
|
"choco install -y sysinternals",
|
||||||
"choco install -y microsoft-edge"
|
"choco install -y microsoft-edge --install-arguments=\"TRANSFORMS=A:\\MicrosoftEdgeEnterpriseX64.mst\""
|
||||||
],
|
],
|
||||||
"valid_exit_codes": [0, 3010]
|
"valid_exit_codes": [0, 3010]
|
||||||
},
|
},
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
[CmdletBinding()]
|
|
||||||
Param(
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$VMName,
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$VSphereFQDN,
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$VSphereUsername,
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$VSpherePassword
|
|
||||||
)
|
|
||||||
|
|
||||||
$PowerCliConfigurationSplat = @{
|
|
||||||
Scope = 'User'
|
|
||||||
ParticipateInCEIP = $False
|
|
||||||
Confirm = $False
|
|
||||||
InvalidCertificateAction = 'Ignore'
|
|
||||||
}
|
|
||||||
Set-PowerCLIConfiguration @PowerCliConfigurationSplat | Out-Null
|
|
||||||
|
|
||||||
$ConnectVIServerSplat = @{
|
|
||||||
Server = $VSphereFQDN
|
|
||||||
User = "$VSphereUsername"
|
|
||||||
Password = "$VSpherePassword"
|
|
||||||
WarningAction = 'SilentlyContinue'
|
|
||||||
}
|
|
||||||
Connect-VIServer @ConnectVIServerSplat | Out-Null
|
|
||||||
|
|
||||||
$GetVMSplat = @{
|
|
||||||
Name = $VMName
|
|
||||||
}
|
|
||||||
$VM = Get-VM @GetVMSplat
|
|
||||||
|
|
||||||
$GetHarddiskSplat = @{
|
|
||||||
VM = $VM
|
|
||||||
}
|
|
||||||
$Harddisk = Get-Harddisk @GetHarddiskSplat
|
|
||||||
$VMFolder = ($Harddisk.Filename.Substring(0, $Harddisk.Filename.LastIndexOf('/')) -split ' ')[1]
|
|
||||||
|
|
||||||
$NewDatastoreDriveSplat = @{
|
|
||||||
Name = 'ds'
|
|
||||||
Datastore = ($VM | Get-Datastore)
|
|
||||||
}
|
|
||||||
New-DatastoreDrive @NewDatastoreDriveSplat
|
|
||||||
|
|
||||||
$CopyDatastoreItemSplat = @{
|
|
||||||
Item = "ds:\$($VMFolder)\*.vmdk"
|
|
||||||
Destination = (Get-Item $PWD)
|
|
||||||
}
|
|
||||||
Copy-DatastoreItem @CopyDatastoreItemSplat
|
|
||||||
|
|
||||||
Disconnect-VIServer * -Confirm:$False
|
|
@ -1,73 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<BlockList>
|
|
||||||
<!-- services to disable -->
|
|
||||||
<Services>
|
|
||||||
<Name>MVMCP2VAgent</Name>
|
|
||||||
<Name>VMTools</Name>
|
|
||||||
<Name> VMUpgradeHelper </Name>
|
|
||||||
<Name> vmvss </Name>
|
|
||||||
<Name>vmdesched</Name>
|
|
||||||
<Name>Virtual Server</Name>
|
|
||||||
<!-- Virtual Machine Helper -->
|
|
||||||
<Name>vmh</Name>
|
|
||||||
<!-- Xen-specific service -->
|
|
||||||
<Name>xensvc</Name>
|
|
||||||
</Services>
|
|
||||||
<!-- drivers to disable -->
|
|
||||||
<Drivers>
|
|
||||||
<Name>vmx_svga</Name>
|
|
||||||
<Name>vmmouse</Name>
|
|
||||||
<Name>vmscsi</Name>
|
|
||||||
<Name>amdpcn</Name>
|
|
||||||
<Name>PCnet</Name>
|
|
||||||
<Name>VMMEMCTL</Name>
|
|
||||||
|
|
||||||
<Name> pvscsi </Name>
|
|
||||||
<Name> vmci </Name>
|
|
||||||
<Name> vmmouse </Name>
|
|
||||||
<Name> vmaudio </Name>
|
|
||||||
<Name> vmrawdsk </Name>
|
|
||||||
<Name> vmxnet </Name>
|
|
||||||
<Name> vmxnet3ndis6 </Name>
|
|
||||||
<Name> vm3dmp </Name>
|
|
||||||
<Name> vmdebug </Name>
|
|
||||||
<Name> vmxnet3ndis5 </Name>
|
|
||||||
|
|
||||||
|
|
||||||
<Name>cirrus</Name>
|
|
||||||
<!-- storage drivers -->
|
|
||||||
<Name>buslogic</Name>
|
|
||||||
<Name>symc810</Name>
|
|
||||||
<Name>cpqarray</Name>
|
|
||||||
<Name>pcntn4m</Name>
|
|
||||||
<Name>cpqnf3</Name>
|
|
||||||
<Name>MRaidNT</Name>
|
|
||||||
<Name>Symc8XX</Name>
|
|
||||||
<!-- VIA chipset drivers -->
|
|
||||||
<Name>viaide</Name>
|
|
||||||
<Name>VIAudio</Name>
|
|
||||||
<Name>VIAPFD</Name>
|
|
||||||
<Name>viafilter</Name>
|
|
||||||
<Name>viaagp</Name>
|
|
||||||
<Name>viaagp1</Name>
|
|
||||||
<!-- network drivers: Intel(R) PRO/100 -->
|
|
||||||
<Name>E100B</Name>
|
|
||||||
<!-- tape drivers -->
|
|
||||||
<Name>4mmdat</Name>
|
|
||||||
<Name>4mmdat-SeSFT</Name>
|
|
||||||
<Name>SCSIChanger</Name>
|
|
||||||
|
|
||||||
<!-- Virtual Machine Monitor -->
|
|
||||||
<Name>vmm</Name>
|
|
||||||
<!-- Xen-specific drivers -->
|
|
||||||
<Name>xenevtchn</Name>
|
|
||||||
<Name>xenvbd</Name>
|
|
||||||
<Name>xennet</Name>
|
|
||||||
</Drivers>
|
|
||||||
<Programs>
|
|
||||||
<Name>ProMON</Name>
|
|
||||||
<Name>s3tray2</Name>
|
|
||||||
<Name>VMwareTray</Name>
|
|
||||||
<Name>VMwareUser</Name>
|
|
||||||
</Programs>
|
|
||||||
</BlockList>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,51 +0,0 @@
|
|||||||
#Requires -Modules 'dism'
|
|
||||||
Param(
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$ImageName,
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$SourceFolder,
|
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[string]$DestinationFile
|
|
||||||
)
|
|
||||||
|
|
||||||
$StartJobSplat = @{
|
|
||||||
ArgumentList = $ImageName, $SourceFolder, $DestinationFile
|
|
||||||
ScriptBlock = {
|
|
||||||
Param(
|
|
||||||
$ImageName,
|
|
||||||
$SourceFolder,
|
|
||||||
$DestinationFile
|
|
||||||
)
|
|
||||||
|
|
||||||
$NewWindowsImageSplat = @{
|
|
||||||
Name = $ImageName
|
|
||||||
CapturePath = $SourceFolder
|
|
||||||
ImagePath = $DestinationFile
|
|
||||||
Verify = $True
|
|
||||||
}
|
|
||||||
New-WindowsImage @NewWindowsImageSplat
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$Job = Start-Job @StartJobSplat
|
|
||||||
|
|
||||||
While ($Job.State -eq 'Running') {
|
|
||||||
$GetItemSplat = @{
|
|
||||||
Path = $DestinationFile
|
|
||||||
ErrorAction = 'SilentlyContinue'
|
|
||||||
}
|
|
||||||
$OutputFile = Get-Item @GetItemSplat
|
|
||||||
If ($OutputFile) {
|
|
||||||
Write-Host "Export in progress ... $($OutputFile.FullName); Size: $('{0:n2}' -f ($OutputFile.Length / 1MB))MB"
|
|
||||||
}
|
|
||||||
Else {
|
|
||||||
Write-Host "Export initiating ... "
|
|
||||||
}
|
|
||||||
|
|
||||||
$StartSleepSplat = @{
|
|
||||||
Seconds = 30
|
|
||||||
}
|
|
||||||
Start-Sleep @StartSleepSplat
|
|
||||||
}
|
|
||||||
|
|
||||||
Receive-Job $Job
|
|
||||||
Remove-Job $Job
|
|
@ -1,7 +0,0 @@
|
|||||||
@rem Uninstall VMware Tools
|
|
||||||
@rem (wait for orphaned child process to finish)
|
|
||||||
@rem Silent mode, basic UI, no reboot
|
|
||||||
start "Uninstall VMware Tools" /b /w e:\setup64 /s /v "/qb REBOOT=R REMOVE=ALL"
|
|
||||||
|
|
||||||
@rem Initiate Sysprep
|
|
||||||
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /unattend:A:\Sysprep_Unattend.xml /quiet /shutdown
|
|
Loading…
Reference in New Issue
Block a user