


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Learning to work in Powershell №3
Typology: Lecture notes
1 / 42
This page cannot be seen from the preview
Don't miss anything!



































Test-Path путь
Test-Path С:
Test-Path ..\ 1230
Write-Host "Выводимая информация"
if ( условие ) { последовательность действий }
if (Test-Path С:) {Write-Host “Такой путь имеется."}
if ( условие ) { действия при True } else { действия при False } или if ( условие 1 ) { действия при True1 } elseif ( условие 2 ) { действия при False1 и True 2 } else { действия при False1 и False2 }
Имяфункции Параметр1 Параметр_
FunA PAA1 BBB
$args[0], $args[1], $args[2] и т.д.
$args.Count
function FunB { $vv = $args[0] + " хранилище и хранилище " + $args[1] Write-Host $vv -F Blue -B White }
$vCPU = 0 ps | foreach{ $vCPU += $_.CPU }
$vCps = 0 ps | foreach{ $vCps++ }
$ имямассива_ = начальноезначение_.. конечное Пример: $b = 10.. $b
$ имямассива_ .Length Пример: $a.Length $b.Length