private/steps/5-drivers/step-drivers-addwindowsdriver-driverpack.ps1
function step-drivers-addwindowsdriver-driverpack { [CmdletBinding()] param () #================================================= # Start the step $Message = "[$(Get-Date -format G)] [$($MyInvocation.MyCommand.Name)] Start" Write-Debug -Message $Message; Write-Verbose -Message $Message # Get the configuration of the step $Step = $global:OSDCloudWorkflowCurrentStep #================================================= $LogPath = "C:\Windows\Temp\osdcloud-logs" $DriverPath = "C:\Windows\Temp\osdcloud\drivers-driverpack" if (Test-Path -Path $DriverPath) { if (-not (Test-Path -Path $LogPath)) { New-Item -ItemType Directory -Path $LogPath -Force | Out-Null } Add-WindowsDriver -Path "C:\" -Driver "$DriverPath" -Recurse -ForceUnsigned -LogPath "$LogPath\drivers-driverpack.log" -ErrorAction SilentlyContinue | Out-Null } #================================================= # End the function $Message = "[$(Get-Date -format G)] [$($MyInvocation.MyCommand.Name)] End" Write-Verbose -Message $Message; Write-Debug -Message $Message #================================================= } |