İlk PowerShell Script'i: .ps1, Çalıştırma Yolları, #Requires, Comment-Based Help ve pwsh mi powershell.exe mi?
Bir PowerShell script'i PowerShell içinden çağrılınca aynı process'te kendi scope'unda, pwsh -File ile çağrılınca yeni bir process'te çalışır ve sonucunu exit code ile bildirir; Write-Error tek başına exit code'u değiştirmez. Bookstore API'sini kontrol eden Test-BookstoreHealth.ps1 ile &, dot-sourcing, -File ve -Command farkını, Linux'ta shebang'i, #Requires'ı, comment-based help'i, Windows PowerShell 5.1 ile 7.6 LTS farklarını ve BOM/CRLF tuzaklarını gösteriyoruz.
15 Kas 2026
·
16 dk
·
4