anyweb 478 Posted August 24, 2015 Report post Posted August 24, 2015 Introduction In a previous posts I've shown you how you can deploy Windows 8.1 x64 to the Surface Pro 3 with MDT 2013 or Configuration Manager 2012 R2. In this post I'll show you how to automate the deployment of Windows 10 x64 to a Surface Pro 3 from start to finish on a Server 2012 R2 server by using a PowerShell script. The PowerShell script is to be run on your soon-to-be MDT server and it will create everything for you, all you have to do is supply it with an OS (Windows 10 x64) and optionally some apps, drivers or even the Windows ADK 10. Fear not, if you don't have the Surface Pro 3 drivers or Windows ADK 10 then the script will download them for you. Download the script You can download the script here, then unzip it. Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - August 2015.zip To use the script simply adjust the many variables within to suit your needs, then when you are ready, run it in PowerShell ISE. The script will automatically download and install Windows ADK 10 and MDT 2013 Update 1. In addition, it will install Windows Deployment Services and after configuring the MDT DeploymentShare it will import the boot image into WDS. The boot image will have both the Surface Pro 3 100mb and gigabit network driver pre-installed. If you want to remove with, simply rem out the line in the script. Speaking of drivers, the script will automatically download the latest drivers for Windows 10 for the Surface Pro 3 and import them into the MDT 2013 Update 1 deployment workbench. Once the script is complete you can go ahead and launch the deployment workbench to review what has happened. Here you can see the drivers imported for the Surface Pro 3. and here are the two selection profiles it creates, one for the Surface Pro 3, the other for WinPEx64 (the boot image). If you open the Deploy Windows 10 x64 - Surface Pro 3 task sequence you can see the inject driver step When you PXE boot (UEFI network boot) the Surface Pro 3, the correct x64 boot image containing NIC drivers for the Surface Pro 3 will be downloaded from WDS you get to enter a computer name (you can modify customsettings.ini to change this behaviour) and select your core apps (Office 365) before the LiteTouch OSD kicks off here you can see that Windows 10 x64 is already installed and now MDT is installing Office 365 Professional and after some time installing that, it's done ! Related Posts CM12 in a Lab - How can I deploy Windows 10 Enterprise x64 with MDT 2013 Update 1 integrated with System Center 2012 R2 SP1 Configuration Manager ? CM12 in a Lab - How can I upgrade to System Center 2012 R2 SP1 with MDT 2013 update 1 integrated ? Johan's list of MDT 2013 Update 1 bugs and workarounds - http://deploymentresearch.com/Research/Post/504/A-Geeks-Guide-for-upgrading-MDT-2013-to-MDT-2013-Update-1 Until next time, adios ! Quote Share this post Link to post Share on other sites
Stonywall 0 Posted September 24, 2015 Report post Posted September 24, 2015 Had a few issues due to code changes in the re-release of MDT 2013 Update 1, along with some updates to the driver files. I have attached my modified code. Hopefully it help someone. # *************************************************************************** # # This Script: Niall Brady - http://www.windows-noob.com # - August 24 2015. # # This script is customized for deploying Windows 10 Enterprise x64 # to the Microsoft Surface Pro 3. It does this by configuring # this server with Windows ADK 10, MDT 2013 Update 1 with Surface Pro 3 # drivers, updates the deployment share and populates WDS # with the MDT boot images before starting WDS. # # All you have to do is run the script, and once complete # PXE the Surface Pro 3 and enjoy the result ! # # This script contains code from other peoples fine # work including:- # # Nickolaj Andersen - http://www.scconfigmgr.com # Chris Steding - http://www.compit.se # Brandon Linton - http://blogs.technet.com/b/brandonlinton/ # Trevor Sullivan - http://trevorsullivan.net/ # # Do yourself a favor and checkout their websites. # # Setup your folder structure like so or change $SourcePath to your desire # # D:\Source # D:\Source\Drivers # D:\Source\Operating Systems\Windows 10 Enterprise x64 # D:\Source\Applications\Core Applications # D:\Source\Applications\Drivers # D:\Source\Applications\Optional # D:\Source\Applications\Reference Applications # # # Usage: Copy the script to the server D:\ # Copy your source files to the folder structure above # If you have already downloaded the Surface Pro 3 drivers, ADK & MDT, copy the files to D:\Source # If the files do not exist in the folder D:\Source the script will download them for you. # Edit the variables in the script below to meet your needs and enjoy. # # ************************************************************************** # This scripts needs unrestricted access # # clear Write-Host "This scripts needs unrestricted access (Set-ExecutionPolicy Unrestricted.) " -nonewline -ForegroundColor Green Write-Host "The setup takes around 30 minutes depending on your internet speed." -nonewline -ForegroundColor Green Write-Host "At the end of the process, if there are any errors they will be shown in red text, review them to see what failed." -ForegroundColor Green # # Download the setup files if needed # Below you can set the sourcepath variable to whatever drive\folder you want. # # $DriverReleaseDate = "150818_1" $DriverReleaseURL = "http://download.microsoft.com/download/2/0/7/2073C22F-2F31-4F4A-8059-E54C91C564A9/SurfacePro3_Win10_150818_1.zip" $SourcePath = "D:\Source" # These 2 lines with help from Trevor ! $ADKPath = '{0}\Windows Kits\10\ADK' -f $SourcePath; $ArgumentList1 = '/layout "{0}" /quiet' -f $ADKPath; # Check if the folder exists, if not, create it if (Test-Path $SourcePath){ Write-Host "The folder $SourcePath exists." } else{ Write-Host "The folder $SourcePath does not exist, creating..." -NoNewline New-Item $SourcePath -type directory | Out-Null Write-Host "done!" -ForegroundColor Green } # Check if these files exists, if not, download them $file1 = $SourcePath+"\adksetup.exe" $file2 = $SourcePath+"\MicrosoftDeploymentToolkit2013_x64.msi" $file3 = $SourcePath+"\Surface Ethernet Adapter.zip" $file4 = $SourcePath+"\SurfacePro3_Win10_$DriverReleaseDate.zip" #$file5 = $SourcePath+"\SurfacePro3PenDriverOct62014.zip" if (Test-Path $file1){ write-host "The file $file1 exists." } else { # Download Windows Assessment and Deployment Kit (ADK 10) Write-Host "Downloading Adksetup.exe " -nonewline $clnt = New-Object System.Net.WebClient $url = "http://download.microsoft.com/download/8/1/9/8197FEB9-FABE-48FD-A537-7D8709586715/adk/adksetup.exe" $clnt.DownloadFile($url,$file1) Write-Host "done!" -ForegroundColor Green } if (Test-Path $ADKPath){ Write-Host "The folder $ADKPath exists." } else{ Write-Host "Downloading Windows ADK 10 which is approx 3GB in size, please wait..." -nonewline Start-Process -FilePath "$SourcePath\adksetup.exe" -Wait -ArgumentList $ArgumentList1 Write-Host "done!" -ForegroundColor Green } if (Test-Path $file2){ write-host "The file $file2 exists." } else { # Download Microsoft Deployment Toolkit 2013 Update 1 Write-Host "Downloading Microsoft Deployment Toolkit 2013 Update 1.." -nonewline $clnt = New-Object System.Net.WebClient $url = "http://download.microsoft.com/download/0/D/E/0DE81822-D03F-4075-93B6-DDEAA0E095F7/install/MicrosoftDeploymentToolkit2013_x64.msi" $clnt.DownloadFile($url,$file2) Write-Host "done!" -ForegroundColor Green } if (Test-Path $file3){ write-host "The file $file3 exists." } else { # Download Surface Pro 3 Ethernet drivers Write-Host "Downloading Surface Pro 3 Ethernet drivers.." -nonewline $clnt = New-Object System.Net.WebClient $url = "http://download.microsoft.com/download/2/0/7/2073C22F-2F31-4F4A-8059-E54C91C564A9/Surface Ethernet Adapter.zip" $clnt.DownloadFile($url,$file3) Write-Host "done!" -ForegroundColor Green } # unzip the file Write-Host "unzipping $file3 " -nonewline $shell_app = new-object -com shell.application $zip_file = $shell_app.namespace($file3) if (Test-Path "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\Surface100mbEthernetAdapter") { $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\Surface100mbEthernetAdapter") } else { mkdir "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\Surface100mbEthernetAdapter" ; $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\Surface100mbEthernetAdapter")} $destination.Copyhere($zip_file.items(), 0x14) Write-Host "done!" -ForegroundColor Green if (Test-Path $file4){ write-host "The file $file4 exists." } else { # Download Microsoft Surface Pro 3 drivers Write-Host "Downloading Surface Pro 3 $DriverReleaseDate drivers.." -nonewline $clnt = New-Object System.Net.WebClient $url = $DriverReleaseURL $clnt.DownloadFile($url,$file4) Write-Host "done!" -ForegroundColor Green } # unzip the drivers file Write-Host "unzipping $file4 " -nonewline $shell_app = new-object -com shell.application $zip_file = $shell_app.namespace($file4) if (Test-Path "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3") { $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3") } else { mkdir "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3" ; $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3")} $destination.Copyhere($zip_file.items(), 0x14) Write-Host "done!" -ForegroundColor Green # if (Test-Path $file5){ # write-host "The file $file5 exists." # } else { # Download Surface Pro 3 Pen drivers (depreciated) # Write-Host "Downloading Surface Pro 3 pen drivers.." -nonewline # $clnt = New-Object System.Net.WebClient # $url = "http://download.microsoft.com/download/2/0/7/2073C22F-2F31-4F4A-8059-E54C91C564A9/SurfacePro3PenDriverOct62014.zip" # $clnt.DownloadFile($url,$file5) # Write-Host "done!" -ForegroundColor Green # } # unzip the file # Write-Host "unzipping $file5 " -nonewline # $shell_app = new-object -com shell.application # $zip_file = $shell_app.namespace($file5) # # if (Test-Path "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3") { $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3") } else { mkdir "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3" ; $destination = $shell_app.namespace("$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3")} # $destination.Copyhere($zip_file.items(), 0x14) # Write-Host "done!" -ForegroundColor Green # This installs the Feature .NET Framework Write-Host "Installing .NET " -nonewline Import-Module ServerManager Add-WindowsFeature as-net-framework Start-Sleep -s 10 # This installs Windows Deployment Service Write-Host "Installing Windows Deployment Services" -nonewline Import-Module ServerManager Install-WindowsFeature -Name WDS -IncludeManagementTools Start-Sleep -s 10 # Install ADK Deployment Tools, Windows Preinstallation Enviroment Write-Host "Installing Windows ADK 10" -nonewline Start-Process -FilePath "$ADKPath\adksetup.exe" -Wait -ArgumentList " /Features OptionId.DeploymentTools OptionId.WindowsPreinstallationEnvironment OptionId.ImagingAndConfigurationDesigner OptionId.UserStateMigrationTool /norestart /quiet /ceip off" Start-Sleep -s 20 # Install Microsoft Deployment Toolkit 2013 $PSScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path msiexec /qb /i "$SourcePath\MicrosoftDeploymentToolkit2013_x64.msi" | Out-Null Start-Sleep -s 10 # Configure MDT 2013 Update 1 # *************************************************************************** # Author: Brandon Linton # # Purpose: This PowerShell script will execute all tasks to create a working # MDT Deployment Share Including: # Create Folder for share # Share MDT Deployment Folder # Creates an example folder structure and selection profiles. # Note that there should be no one actively adding items to the # deployment share while running this script, as some of the # operations performed could cause duplicated or lost items. # Usage: Copy this file to an appropriate location. Edit the constant # variables below to meet your needs and enjoy. # ------------- DISCLAIMER -------------------------------------------------- # This script code is provided as is with no guarantee or warranty concerning # the usability or impact on systems. # ------------- DISCLAIMER -------------------------------------------------- # # ************************************************************************** # Initialize Add-PSSnapIn Microsoft.BDD.PSSnapIn -ErrorAction SilentlyContinue # Constants #$Computer = get-content env:computername $Computer = [System.Net.Dns]::GetHostByName(($env:computerName)).HostName $FolderPath = "D:\DeploymentShare" $TSFolder1 = "001" $ShareName = "DeploymentShare$" $NetPath = "\\$Computer\DeploymentShare$" $MDTDescription = "MDT Deployment Share" $OStoDeploy = "Windows 10 Enterprise x64" $OStoDeployShortName = "Windows 10" $TaskSequenceFolderName1 = "Production" $TaskSequenceFolderName2 = "Test" $TaskSequenceFolderName3 = "Server Deployments" $TaskSequenceFolderName4 = "Application Installation Only" # Make MDT Directory if (Test-Path "$FolderPath"){ write-host "'$FolderPath' already exists, will not recreate it." } else { mkdir "$FolderPath" } # Create MDT Shared Folder $Type = 0 $objWMI = [wmiClass] 'Win32_share' $objWMI.create($FolderPath, $ShareName, $Type) # Create PS Drive for MDT new-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root "$FolderPath" -Description "$MDTDescription" -NetworkPath "$NetPath" -Verbose | add-MDTPersistentDrive -Verbose # Create OS Folders new-item -path "DS001:\Operating Systems" -enable "True" -Name $OStoDeployShortName -Comments "" -ItemType "folder" -Verbose # Create Driver Folders new-item -path "DS001:\Out-of-Box Drivers" -enable "True" -Name "WinPE x64" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Out-of-Box Drivers" -enable "True" -Name $OStoDeployShortName -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Out-of-Box Drivers\$OStoDeployShortName" -enable "True" -Name "Microsoft Corporation" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Out-of-Box Drivers\$OStoDeployShortName\Microsoft Corporation" -enable "True" -Name "Surface Pro 3" -Comments "" -ItemType "folder" -Verbose # Create Packages Folders new-item -path "DS001:\Packages" -enable "True" -Name "Language Packs" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Packages" -enable "True" -Name "MSU" -Comments "" -ItemType "folder" -Verbose # Create Task Sequence Folders new-item -path "DS001:\Task Sequences" -enable "True" -Name $TaskSequenceFolderName1 -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Task Sequences" -enable "True" -Name $TaskSequenceFolderName2 -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Task Sequences" -enable "False" -Name $TaskSequenceFolderName3 -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Task Sequences" -enable "True" -Name $TaskSequenceFolderName4 -Comments "" -ItemType "folder" -Verbose # Create Application Folders new-item -path "DS001:\Applications" -enable "True" -Name "Applications" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Applications" -enable "True" -Name "Bundled Applications" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Applications" -enable "True" -Name "Drivers" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Applications" -enable "True" -Name "OS Updates" -Comments "" -ItemType "folder" -Verbose # Create Selection Profiles new-item -path "DS001:\Selection Profiles" -enable "True" -Name "Surface Pro 3" -Comments "" -Definition "<SelectionProfile><Include path=`"Out-of-Box Drivers\$OStoDeployShortName\Microsoft Corporation\Surface Pro 3`" /></SelectionProfile>" -ReadOnly "False" -Verbose new-item -path "DS001:\Selection Profiles" -enable "True" -Name "WinPE x64" -Comments "" -Definition "<SelectionProfile><Include path=`"Out-of-Box Drivers\WinPE x64`" /></SelectionProfile>" -ReadOnly "False" -Verbose # Import Operating System Source Files import-mdtoperatingsystem -path "DS001:\Operating Systems\$OStoDeployShortName" -SourcePath "$SourcePath\Operating Systems\$OStoDeploy" -DestinationFolder "$OStoDeploy" -Verbose # Import MSU # import-mdtpackage -path "DS001:\Packages\MSU" -SourcePath "$SourcePath\MSU" -Verbose # Import Applications # Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" # import-MDTApplication -path "DS001:\Applications\Core Applications" -enable "True" -Name "Office 365 Pro Plus x86" -ShortName "Office 365 Pro Plus" -Version "x86" -Publisher "" -Language "" -CommandLine "Setup.EXE /configure Install_Production.xml" -WorkingDirectory ".\Applications\Office 365 Pro Plus x86" -ApplicationSourcePath "D:\Source\Applications\Core Applications\Microsoft Office 365 Pro Plus x86" -DestinationFolder "Office 365 Pro Plus x86" -Verbose # Import Drivers import-mdtdriver -path "DS001:\Out-of-Box Drivers\$OStoDeployShortName\Microsoft Corporation\Surface Pro 3" -sourcePath "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3" -Verbose #import Network drivers into WinPE x64 import-mdtdriver -path "DS001:\Out-of-Box Drivers\WinPE x64" -SourcePath "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\SurfacePro3_Win10_150818_1\Drivers\Network\SurfaceGigabitEthernetAdapter" -Verbose import-mdtdriver -path "DS001:\Out-of-Box Drivers\WinPE x64" -SourcePath "$SourcePath\Drivers\Microsoft Corporation\Surface Pro 3\Surface100mbEthernetAdapter" -Verbose # Create Task Sequence import-mdttasksequence -path "DS001:\Task Sequences\Production" -Name "Surface Pro 3 - $OStoDeploy" -Template "Client.xml" -Comments "" -ID "$TSFolder1" -Version "1.0" -OperatingSystemPath "DS001:\Operating Systems\$OSToDeployShortName\Windows 10 Enterprise in Windows 10 Enterprise x64 install.wim" -FullName "Windows User" -OrgName "Contoso" -HomePage "http://contoso.com/" -AdminPassword "Password" -Verbose ############################################# # This will replace the standard customsettings.ini with the below # edit variables with your own values # $JoinDomain="Contoso.com" $DomainAdmin="Administrator" $DomainAdminDomain="CONTOSO" $DomainAdminPassword="Password" $CSFile = @" [Settings] Priority=TaskSequenceID, Model, Default Properties=MyCustomProperty, MaskedVariables [Default] _SMSTSOrgName=Contoso MaskedVariables=_SMSTSReserved2,OSDUserStateKeyPassword ScanStateArgs=/v:5 /o /c LoadStateArgs=/v:5 /c /lac /lae BitsPerPel=32 VRefresh=60 XResolution=1 YResolution=1 OSInstall=Y SkipRoles=YES SkipCapture=YES SkipTimeZone=YES SkipUserData=YES SkipBitLocker=YES SkipProductKey=YES SkipAdminPassword=YES #SkipAppsOnUpgrade=YES SkipComputerBackup=YES SkipDeploymentType=YES SkipLocaleSelection=YES JoinDomain=$JoinDomain DomainAdmin=$DomainAdmin DomainAdminDomain=$DomainAdminDomain DomainAdminPassword=$DomainAdminPassword MachineObjectOU=OU=Workstations,DC=contoso,DC=com UILanguage=en-US UserLocale=en-CA KeyboardLocale=en-US TimeZoneName=Mountain Standard Time #WsusServer=http://wsus.contoso.com:8530 WUMU_ExcludeKB001=982861 WUMU_ExcludeKB002=976002 WUMU_ExcludeKB003=2267621 WUMU_ExcludeKB004=2434419 WUMU_ExcludeKB005=2496898 WUMU_ExcludeKB006=2533552 WUMU_ExcludeKB007=2604521 WUMU_ExcludeKB008=2673774 WUMU_ExcludeKB009=2694771 WUMU_ExcludeKB010=2726535 WUMU_ExcludeKB011=2841134 #[Surface Pro 3] #XResolution=2160 #YResolution=1440 "@ # The closing part of the here-string needs to be the first characters on the line Remove-Item -Path "$FolderPath\Control\CustomSettings.ini" -Force New-Item -Path "$FolderPath\Control\CustomSettings.ini" -ItemType File -Value $CSFile ############################################## # replace the standard bootstrap.ini with our own # fill in the variables below with your chosen values # you can even use local user/passwords on this server $MDTServer="MDTServer" $OrgName="Contoso" $UserID="Administrator" $UserPassword="Password" $UserDomain="CONTOSO" $BSFile = @" [Settings] Priority=Default [Default] _SMSTSOrgName=$OrgName UserID=$UserID UserDomain=$UserDomain UserPassword=$UserPassword DeployRoot=$NetPath "@ # The closing part of the here-string needs to be the first characters on the line Remove-Item -Path "$FolderPath\Control\BootStrap.ini" -Force New-Item -Path "$FolderPath\Control\BootStrap.ini" -ItemType File -Value $BSFile ############################################## # make modifications to the Task Sequence # $FolderPath = "D:\DeploymentShare" $TSXMLFile = "$FolderPath\Control\$TSFolder1\ts.xml" # load the task sequence XML file [xml]$TSSettingsXML = Get-Content $TSXMLFile # replace select profile with Surface Pro 3 $TSSettingsXML.Sequence.Group.Step | Where-Object {$_.Name -like "*Inject Driver*"} | ForEach-Object { $CurrentObject = $_ if ($CurrentObject.RunIn -like "WinPEandFullOS") { $CurrentObject.defaultVarList.variable | Where-Object { $_.Name -like "DriverSelectionProfile" } | ForEach-Object { $_."#text" = "Surface Pro 3" } } # replace Auto with all for drivers to use from the selected profile if ($CurrentObject.RunIn -like "WinPEandFullOS") { $CurrentObject.defaultVarList.variable | Where-Object { $_.Name -like "DriverInjectionMode" } | ForEach-Object { $_."#text" = "ALL" } } } $TSSettingsXML.Save($TSXMLFile) # add the Surface Pro 3 WMI query # $FolderPath = "D:\DeploymentShare" $TSXMLFile = "$FolderPath\Control\$TSFolder1\ts.xml" [xml]$TSSettingsXML = Get-Content $TSXMLFile $InjectDriversElement = $TSSettingsXML.Sequence.Group.Step | Where-Object {($_.Name -like "*Inject Driver*") -and ($_.runIn -like "WinPEandFullOS")} $ConditionElement = $InjectDriversElement.AppendChild($TSSettingsXML.CreateElement("condition")) $ExpressionElement = $ConditionElement.AppendChild($TSSettingsXML.CreateElement("expression")) $ExpressionElement.SetAttribute("type", "SMS_TaskSequence_WMIConditionExpression") $VariableNameElement = $ExpressionElement.AppendChild($TSSettingsXML.CreateElement("variable")) $VariableNameElement.SetAttribute("name", "Namespace") $VariableNameTextNode = $VariableNameElement.AppendChild($TSSettingsXML.CreateTextNode("root\cimv2")) $VariableQueryElement = $ExpressionElement.AppendChild($TSSettingsXML.CreateElement("variable")) $VariableQueryElement.SetAttribute("name", "Query") $VariableQueryTextNode = $VariableQueryElement.AppendChild($TSSettingsXML.CreateTextNode('SELECT * FROM Win32_ComputerSystem WHERE Model Like "%Surface Pro 3%"')) $TSSettingsXML.Save($TSXMLFile) ############################################## # Disable the X86 boot wim and change the Selection Profile for the X64 boot wim $XMLFile = "$FolderPath\Control\Settings.xml" [xml]$SettingsXML = Get-Content $XMLFile $SettingsXML.Settings."SupportX86" = "False" $SettingsXML.Settings."Boot.x64.SelectionProfile" = "WinPE x64" $SettingsXML.Save($XMLFile) #Update the Deployment Share to create the boot wims and iso files update-MDTDeploymentShare -path "DS001:" -Force -Verbose Start-Sleep -s 60 #Attach the boot wim images to WDS $WDSPath = 'D:\RemoteInstall' wdsutil /Verbose /Progress /Initialize-Server /RemInst:$WDSPath Start-Sleep -s 10 Write-Host "Attempting to start WDS..." -NoNewline wdsutil /Verbose /Start-Server Start-Sleep -s 10 Write-Host "setting PXE response policy..." -NoNewline # this sets WDS to reply to all computers that PXE boot wdsutil /Set-Server /AutoAddPolicy # if you don't want that behavior then Rem that line and unrem the next two lines, after adding the correct MAC address # $MacAddress="001122334455" # New-WdsClient -DeviceID $MacAddress -DeviceName "SurfacePro3" -BootImagePath "Boot\x64\Images\LiteTouchPE_x64.wim" # Start-Sleep -s 10 Write-Host "Importing Boot image..." -NoNewline Import-WdsBootImage -Path $FolderPath\Boot\LiteTouchPE_x64.wim -NewImageName "LiteTouchPE_x64" –SkipVerify # All done Write-Host "The installation and configuration is done. If you saw any WDS errors then please restart the server and verify that the WDS service is started." -nonewline -ForegroundColor Green Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1.txt Quote Share this post Link to post Share on other sites
mmenzie 0 Posted September 30, 2015 Report post Posted September 30, 2015 I can't get either the script in the OP or the one above in the reply to work. the one in the OP I don't have an "E drive" so I changed the sourcepath to "F" as it said to do. that one kept failing at downloading the updated drivers as I guess the august path was taken down by Microsoft?? so then I came back here and saw Stonywalls reply and it had the path to the September files but his script uses the "D drive" as the source. so again I changed the source path to "F" and this time it made it through all the driver downloads then showed its first failure at installing the windows 10 ADK at the mkdir saying the device is not ready and more errors at "d:\deploymentshare" cause like I said before I don't have a "D drive" and more red follows after that all complaining about the missing "D drive" I though the only thing that needed to change was the "sourcepath" if you were using different drives?? ****EDIT*** so I see where I went wrong... there are more variables that need to be changed. way too many for a noob like me to know about. for us ultra noobs out there there should be some readme or some kind of instructions on what to change. way too many references to contoso to know where to change them all. drive paths, folder paths, source paths, etc..... I still cant figure out what I need to change... all I want to do is make my surface pro 3 that came with a 8.1 Pro license from the retailer have windows 10 enterprise that came from my Microsoft VLSC and not have to worry about drivers or SP3 apps that should be there not being there. I don't have a CD Rom for my SP3 so I though using SCCM would be a good learning experience but this guide seems to be far more advanced than this SCCM noob is ready for Quote Share this post Link to post Share on other sites
scottarndt 0 Posted October 23, 2015 Report post Posted October 23, 2015 I have a unique situation where I need to upgrade some SP3 devices from 8.1 Pro (stock install) to Windows 10 Pro. I have a two part question. First I have tried and failed to get the .esd file converted to a .wim to create a Windows 8.1 Pro deployment in Deployment Workbench; so where can I get a Surface Pro 3 or Windows 8.1 Pro wim legitimately. Secondly, Can I run two deployments in one task sequence, one being a Windows 8.1 clean Surface Pro 3 deployment and the second being a 10 Pro upgrade (after the 8.1 install has been activated). The main issue is we have a large amount of devices to upgrade and manually performing the installations (or essentially two on each device) takes a large amount of time and I'm trying to find a better way to do this. Any ideas or thoughts would be great. Quote Share this post Link to post Share on other sites
anyweb 478 Posted October 23, 2015 Report post Posted October 23, 2015 when you say upgrade do you mean you want to keep the data/settings, or do you not care at all about that Quote Share this post Link to post Share on other sites
dprows 0 Posted March 29, 2016 Report post Posted March 29, 2016 Any possibility of getting an updated script? Getting lots of errors stating the files don't exist when it is trying to download. I have tried updating the script, but haven't had much luck. Thanks, Dave Quote Share this post Link to post Share on other sites
dprows 0 Posted March 29, 2016 Report post Posted March 29, 2016 (edited) Any possibility of getting an updated script? Getting lots of errors stating the files don't exist when it is trying to download. I have tried updating the script, but haven't had much luck. Thanks, Dave There is a reference to a ts.xml file. I do not see this anywhere. Is this a file I just need to create a blank file for an it will fill it in, do I copy a template for that, or what? I am finding I also need Windows 10 Enterprise in Windows 10....wim and I am not sure where to get this. I have the windows 10 Enterprise iso, but that doesn't seem to be what I need for that. Edited March 29, 2016 by dprows Quote Share this post Link to post Share on other sites
anyweb 478 Posted April 16, 2016 Report post Posted April 16, 2016 Any possibility of getting an updated script? Getting lots of errors stating the files don't exist when it is trying to download. I have tried updating the script, but haven't had much luck. Thanks, Dave it worked fine when i created it, can you post some of the errors you get... Quote Share this post Link to post Share on other sites
anyweb 478 Posted April 16, 2016 Report post Posted April 16, 2016 There is a reference to a ts.xml file. I do not see this anywhere. Is this a file I just need to create a blank file for an it will fill it in, do I copy a template for that, or what? I am finding I also need Windows 10 Enterprise in Windows 10....wim and I am not sure where to get this. I have the windows 10 Enterprise iso, but that doesn't seem to be what I need for that. the script creates the TS.XML via MDT, you don't need to create it, you must however supply the Windows 10 media as explained in this guide. Quote Share this post Link to post Share on other sites
adigraham 0 Posted July 5, 2016 Report post Posted July 5, 2016 Hi, I have MDT 2013 Update 2 installed and the TS.XML is not created as it errors out:- Import-MDTTaskSequence : Cannot bind parameter 'OperatingSystemPath' to the target. Exception setting "OperatingSystemPath": "Cannot find path 'DS001:\Operating Systems\Windows 10\Windows 10 Enterprise in Windows 10 Enterprise x64 install.wim' because it does not exist." At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:310 char:190 + import-mdttasksequence -path "DS001:\Task Sequences\Production" -Name "Surface P ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: ( [Import-MDTTaskSequence], ParameterBindingException + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.BDD.PSSnapIn.ImportTaskSequence LastWriteTime : 05/07/2016 15:59:22 Length : 1235 Name : CustomSettings.ini LastWriteTime : 05/07/2016 15:59:22 Length : 199 Name : BootStrap.ini Get-Content : Cannot find path 'D:\DeploymentShare\Control\001\ts.xml' because it does not exist. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:424 char:23 + [xml]$TSSettingsXML = Get-Content $TSXMLFile + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (D:\DeploymentShare\Control\001\ts.xml:String) [Get-Content], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:440 char:1 + $TSSettingsXML.Save($TSXMLFile) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Get-Content : Cannot find path 'D:\DeploymentShare\Control\001\ts.xml' because it does not exist. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:445 char:23 + [xml]$TSSettingsXML = Get-Content $TSXMLFile + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (D:\DeploymentShare\Control\001\ts.xml:String) [Get-Content], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:448 char:1 + $ConditionElement = $InjectDriversElement.AppendChild($TSSettingsXML.CreateEleme ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:449 char:1 + $ExpressionElement = $ConditionElement.AppendChild($TSSettingsXML.CreateElement( ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:450 char:1 + $ExpressionElement.SetAttribute("type", "SMS_TaskSequence_WMIConditionExpression ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:451 char:1 + $VariableNameElement = $ExpressionElement.AppendChild($TSSettingsXML.CreateEleme ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:452 char:1 + $VariableNameElement.SetAttribute("name", "Namespace") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:453 char:1 + $VariableNameTextNode = $VariableNameElement.AppendChild($TSSettingsXML.CreateTe ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:454 char:1 + $VariableQueryElement = $ExpressionElement.AppendChild($TSSettingsXML.CreateElem ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:455 char:1 + $VariableQueryElement.SetAttribute("name", "Query") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:456 char:1 + $VariableQueryTextNode = $VariableQueryElement.AppendChild($TSSettingsXML.Create ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\Temp\Setup MDT 2013 Update 1 for Microsoft Surface Pro 3 - Updated September 2015.ps1:457 char:1 + $TSSettingsXML.Save($TSXMLFile) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull Cheers Adi Quote Share this post Link to post Share on other sites
anyweb 478 Posted July 5, 2016 Report post Posted July 5, 2016 see your first error cannot find path 'DS001:\Operating Systems\Windows 10\Windows 10 Enterprise in Windows 10 Enterprise x64 install.wim' because it does not exist." Quote Share this post Link to post Share on other sites
adigraham 0 Posted July 6, 2016 Report post Posted July 6, 2016 ok, slightly confused, i have mounted and extracted the Windows 10 Enterprise x64 1511.iso to F:\Source\Operating Systems\Windows 10 Enterprise x64. Do i need to supply a wim file too? see your first error cannot find path 'DS001:\Operating Systems\Windows 10\Windows 10 Enterprise in Windows 10 Enterprise x64 install.wim' because it does not exist." Quote Share this post Link to post Share on other sites
adigraham 0 Posted July 14, 2016 Report post Posted July 14, 2016 Apologies, but can you give me a little bit more to help me resolve this please? Quote Share this post Link to post Share on other sites
adigraham 0 Posted July 27, 2016 Report post Posted July 27, 2016 Accidently uploaded Win7 ENT not Win 10! Also had to download the GBe drivers and add to F:\Source\Drivers\Microsoft Corporation\Surface Pro 3\SurfacePro3_Win10_160420_0\Drivers\Network\SurfaceGigabitEthernetAdapter Apologies, but can you give me a little bit more to help me resolve this please? Quote Share this post Link to post Share on other sites