Отчет о существующих драйверах
$hp=$ibm=$lexmark=$star=$text=$ps=$generic=0
Get-ChildItem ((Get-Item Env:\systemroot).value+"\inf") -Exclude *.pnf |
Where-Object { $_.name -match "prn" } |
foreach-object($_){
switch -regex -file $_.fullname
{
'hp' { $hp++ }
'ibm' { $ibm++ }
'lexmark' { $lexmark++ }
'star' { $star++ }
'text' { $text++ }
'ps' { $ps++ }
'generic' { $generic++ }
}
}
"
The following details the printer drivers currently available on the system:
HP drivers: $hp
IBM drivers: $ibm
Lexmark drivers: $lexmark
Star drivers: $Star
Text drivers: $text
PS drivers: $ps
Generic drivers: $generic
"
Голосов пока нет

Оставить комментарий