PowerShell/PowerShellでexitの値を取得する方法・$lastexitcode
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* PowerShellでexitの値を取得する方法・$lastexitcode [#c8a...
PowerShellで書いたスクリプト内のexitの戻り値を取得するに...
以下にサンプルスクリプトを記します。
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* 関連記事 [#be6c6e79]
-[[PowerShellスクリプトを起動できるようにする>PowerShell/...
-[[PowerShellのバージョンを確認する方法>PowerShell/PowerS...
* $lastexitcodeを使う [#a4caaabc]
#ref(exit99.ps1)
サンプルスクリプトはexit 99のみを記述したものです。
exit 99
PowerShellを起動し、exit99.ps1を実行し$lastexitcodeを確認...
PS C:\Users\sakura> .\exit99.ps1
PS C:\Users\sakura> $LASTEXITCODE
99
PS C:\Users\sakura> $lastexitcode
99
大文字、小文字のどちらでも確認することができます。
以上、PowerShellでスクリプトが返却するexitの値を取得する...
//#htmlinsertpcsp(win-btm.html,win-sp.html)
終了行:
#navi(../)
* PowerShellでexitの値を取得する方法・$lastexitcode [#c8a...
PowerShellで書いたスクリプト内のexitの戻り値を取得するに...
以下にサンプルスクリプトを記します。
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* 関連記事 [#be6c6e79]
-[[PowerShellスクリプトを起動できるようにする>PowerShell/...
-[[PowerShellのバージョンを確認する方法>PowerShell/PowerS...
* $lastexitcodeを使う [#a4caaabc]
#ref(exit99.ps1)
サンプルスクリプトはexit 99のみを記述したものです。
exit 99
PowerShellを起動し、exit99.ps1を実行し$lastexitcodeを確認...
PS C:\Users\sakura> .\exit99.ps1
PS C:\Users\sakura> $LASTEXITCODE
99
PS C:\Users\sakura> $lastexitcode
99
大文字、小文字のどちらでも確認することができます。
以上、PowerShellでスクリプトが返却するexitの値を取得する...
//#htmlinsertpcsp(win-btm.html,win-sp.html)
ページ名: