Windows 10/PowerShell
PowerShell : Switch
summerandwinter
2019. 6. 14. 21:41
반응형
- Switch
$i=0
switch($i)
{
0 {Write-Host "0000"}
1 {Write-Host "1111"}
2 {Write-Host "2222"}
}
switch("도망")
{
'도망' {Write-Host "Run"}
0 {Write-Host "0000"}
1 {Write-Host "1111"}
2 {Write-Host "2222"}
}
about_Switch
About Switch In this article --> SHORT DESCRIPTION Explains how to use a switch to handle multiple If statements. LONG DESCRIPTION To check a condition in a script or function, use an If statement. The If statement can check many types of conditions, inclu
docs.microsoft.com
반응형