<#
.SYNOPSIS
Driver installation in an easy and faster way using PowerShell script.
.DESCRIPTION
This script will install the hardware model drivers in a faster and easy way while Task Sequence execution and help OSD administrators to reduce the overall installation time and make life easy.
.NOTES
=============================================================================================================================================
Created with: Windows PowerShell ISE
Created on: Tuesday, August 17, 2022, 2:05:44 PM
Created by: Dashrath Chate
Organization: Blogger
=============================================================================================================================================
#>
$TSEnvironment = New-Object -COMObject Microsoft.SMS.TSEnvironment
$SMSTSLogPath = $TSEnvironment.Value("_SMSTSLogPath")
$OSDrive = "C:\"
#Set the folder where Driver will be extracted
$DriversExtracted = $OSDrive + "\Windows\Temp\Drivers\"
mkdir $DriversExtracted -Force
#Extract the Drivers
&$PSScriptRoot\Files\7za.exe x $PSScriptRoot\Drivers.zip -y -o"$DriversExtracted"
#Load the DISM Drivers
&$PSScriptRoot\Files\DISM\wimmountadksetupamd64.exe /Install /q
#Run DISM
&$PSScriptRoot\Files\DISM\DISM.exe /Image:$OSDrive /Add-Driver /Driver:$DriversExtracted /Recurse /LogPath:$SMSTSLogPath\DISM_DriverInjection.log
#Cleanup
Drivers
RMDIR $DriversExtracted -Recurse -Force
7. Create the normal SCCM package and distribute it on required DPs and use and use in the Task sequence as shown in the below image.
8. While the package is executing during the Task Sequence execution, the lo file will create in the CCM\logs folder named "DISM_DriverInjection.log"
9. Build the reference machine and test the solution !!!
No comments:
Post a Comment
Leave your valuable words here for improve better.