Reply to thread

Re-try with this code:[HIDE][CODE]

$extdrivers="$env:userprofile\desktop\extdrivers.txt"

$extdrivers2="$env:userprofile\desktop\extdrivers2.txt"

$tempfile="$env:userprofile\desktop\temp.txt"

$output="$env:userprofile\desktop\Non-ms-drivers.txt"

$command = {c:\windows\system32\cmd.exe /c '%userprofile%\Desktop\driverview-x64\driverview.exe' /sort 1 /stext %userprofile%\desktop\extdrivers.txt}

Invoke-Command -scriptblock $command

type $extdrivers | find /i "driver name" | out-file $extdrivers2

$drivers = Get-Content $extdrivers2

FOR ($i=1; $i -lt $drivers.Length; $i++) {

NV -Name "linea$i"

SV -name "linea$i" -value ($drivers.GetValue($i))

$tmp = GV -name linea$i -valueonly

$tmp = ( $tmp.TrimStart("Driver Name       : ") + " , " )

$tmp | out-file $tempfile -append

RV -Name "linea$i"

}

$tmp = get-content $tempfile | sort

$tmp = $tmp -join ""

$tmp = $tmp.TrimEnd(" , ")

$tmp = $tmp.Replace(" , ", ",")

$tmp | out-file $output

verifier /flags 0x22892b /bootmode resetonbootfail /driver $tmp

del $output, $extdrivers, $tempfile, $extdrivers2

rv tmp, tempfile, output, i, extdrivers2, drivers[/CODE][/HIDE]

And this command:


Back
Top