Thanks to both of you for the information.
From: [email protected] [mailto:[email protected]] On
Behalf Of Patton, Uriah Allen
Sent: Thursday, October 20, 2016 11:33 AM
To: [email protected]
Subject: RE: [MDT-OSD] SCCM Standalone media and UEFI
I have encountered the same problem. There are only 2 solutions that I have
found. 1) set the BIOS to boot to the hard drive first or 2) create a script
that pauses the deployment at the beginning prompting to remove the USB key and
the deployment hangs until the key is removed. I couldn’t rely on the people
running the deployment to check/change the BIOS every time so I went with
option 2. Below is the PowerShell script I created and use. It checks in a loop
for the “sources” folder, which should only exist on the deployment USB key/CD,
and quits the loop once the key is removed and the “sources” folder is no
longer present.
Put this script as the very first TS step that runs in the Initialization
portion of the task sequence (see the attached picture). This way the USB key
is forced to be removed before the drive is wiped, partitioned, and the OS
installed. This will prevent the UEFI from recognizing or looking for the USB
key as a bootable device option after the disk is wiped and partitioned.
Hopefully this helps.
#Search for a CD or removable drive
$Drives = Get-WmiObject -Class Win32_LogicalDisk | Where-Object {
$_.Description -match "Removable" -or $_.Description -match "CD" }
foreach ($a in $Drives)
{
$DrvLetter = $a.name
#Verify existance of the "sources" folder
$SourceTest = Test-Path "$DrvLetter\sources"
if ($SourceTest -eq $true)
{
$FldrTest = $true
#Loop until the "sources" folder no longer exists
do
{
[void][System.Windows.Forms.MessageBox]::Show("You must
eject/remove your Windows PE USB Key or CD before the deployment can
continue.", "Remove Windows PE USB/CD-ROM", 'OK', 'Exclamation')
$FldrTest = Test-Path "$DrvLetter\sources"
}
while ($FldrTest -eq $true)
#Exit script and return 0 error since the drive has been removed
return 0
exit
}
else
{
#Return 0 error since no cd or removable drive found
return 0
exit
}
}
Thanks,
Uriah Patton
System Administrator
IU School of Medicine
Department of Pediatrics
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Augustine, Greg
Sent: Thursday, October 20, 2016 11:58 AM
To: '[email protected]'
<[email protected]<mailto:[email protected]>>
Subject: [MDT-OSD] SCCM Standalone media and UEFI
We are working with a USB key for sites that have 1 or 2 computers for
reimaging. When we set the computer to use UEFI and remove the legacy options
the USB key boots and starts the imaging process. When the computer reboots
it always boots to the USB key unless it is removed. We have even selected the
2 different windows boot manager option on the boot menu and they both boot the
USB key. Any suggestions?
Greg Augustine
Office of Administration
Information Technology Services Division – State Data Center
(573)-751-4714