3テラバイト

プログラム関連備忘録サイト。主にゲーム。

PowerShell

PowerShellでプロセスを実行するコマンドレットStart-Processの使い方

投稿日:

こんにちは、今日はPowerShellでプロセスを実行するコマンドレットStart-Processの使い方についてまとめていきます。

確認環境

PSVersion 5.1.18362.1110

Start-Processの使い方

-FilePathオプションに実行するプロセスを指定するとそのプロセスが実行されます。

この例ではメモ帳が実行されます。

Start-Process -FilePath Notepad.exe

リンク

Start-Process (Microsoft.PowerShell.Management) – PowerShell | Microsoft Docs
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1

-PowerShell


comment

メールアドレスが公開されることはありません。

関連記事

no image

PowerShellでCSVファイルを出力する

こんにちは、今日はPowerShellでCSVファイルを出力する方法についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 CSVファイルを出力する CSVファイルを出 …

no image

PowerShellで特定ディレクトリのファイル内文字列を置換する

Get-ChildItem . | ForEach-Object {Get-Content -Encoding utf8 $_ | ForEach-Object {$_ -creplace ‘br’, …

no image

PowerShellでホストプログラムを取得するコマンドレットGet-Hostの使い方

こんにちは、今日はPowerShellでホストプログラムを取得するコマンドレットGet-Hostの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 Get- …

no image

PowerShellでユーザーの入力と出力結果を記録してテキストに出力するStart-Transcriptの使い方

記録を開始する Start-Transcript Start-Transcriptコマンドレットで記録を開始します。出力ファイルを指定しない場合、自動でユーザーの Documents 以下にテキストが …

no image

PowerShellでアイテムをリネームするコマンドレットRename-Itemの使い方

こんにちは、今日はPowerShellでアイテムをリネームするコマンドレットRename-Itemの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 Ren …