AS
Size: a a a
AS
AS
4
AS
SM
AS
SM
РП
$FormMyPrinters = New-Object system.Windows.Forms.Form
$FormMyPrinters.ClientSize = '260,330'
$FormMyPrinters.text = "Принтеры"
$FormMyPrinters.TopMost = $false
$posY = -30
$PrinterCounter = 0
foreach ($p in $(Get-WMIObject Win32_Printer)) {
$PrinterCounter++
$posY = $posY + 40
New-Variable -Name PrinterButton$PrinterCounter -Value $(New-Object system.Windows.Forms.Button)
(Get-Variable PrinterButton$PrinterCounter).Value.text = $p.name
(Get-Variable PrinterButton$PrinterCounter).Value.location = New-Object System.Drawing.Point(10,$posY)
(Get-Variable PrinterButton$PrinterCounter).Value.width = 100
(Get-Variable PrinterButton$PrinterCounter).Value.height = 30
$FormMyPrinters.Controls.Add((Get-Variable PrinterButton$PrinterCounter).Value)
}
$FormMyPrinters.ShowDialog()WW
WW
АП
WW
WW
АП
SM
J
АП
AB
SS