- PowerShell function
- 파워쉘 함수
1 예시 1[ | ]
Console
Copy
PS C:\Users\jmnote> Function Greet {"hello"}
PS C:\Users\jmnote> Greet
hello
2 예시 2[ | ]
Console
Copy
PS C:\Users\jmnote> Function Sum($a,$b){$a+$b}
PS C:\Users\jmnote> Sum 5 6
11
Console
Copy
PS C:\Users\jmnote> Function Sum2{$args[0]+$args[1]}
PS C:\Users\jmnote> Sum2 6 7
13
3 예시 3[ | ]
Console
Copy
PS C:\Users\jmnote> Function Greet{"Hello, $args"}
PS C:\Users\jmnote> Greet
Hello,
PS C:\Users\jmnote> Greet John
Hello, John
PS C:\Users\jmnote> Greet John Smith
Hello, John Smith
PS C:\Users\jmnote> Greet John Smith
Hello, John Smith
4 같이 보기[ | ]
5 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- PowerShell (3)
윈도우 PowerShell ―Pinkcrimson
윈도우 PowerShell ― Jmnote윈도우 PowerShell ―Pinkcrimson