3テラバイト

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

PowerShell

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

投稿日:

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

確認環境

PSVersion 5.1.18362.1110

Get-Hostの使い方

コマンドを実行すると以下のようにホストの情報が表示されます。

PS C:\Users\santerabyte> Get-Host


Name             : ConsoleHost
Version          : 5.1.18362.1171
InstanceId       : XXXXXXXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : ja-JP
CurrentUICulture : ja-JP
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

-PowerShell


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


reCaptcha の認証期間が終了しました。ページを再読み込みしてください。

関連記事

no image

PowerShellでアイテムのコンテンツを取得するコマンドレットGet-Contentの使い方

こんにちは、今日はPowerShellでアイテムのコンテンツを取得するコマンドレットGet-Contentの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 …

no image

PowerShellでエクスプローラーと同じ並びでファイルのリストを取得する

こんにちは、今日はPowerShellでエクスプローラーと同じ並びでファイルのリストを取得する方法についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 ファイル一覧取 …

no image

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

Get-ChildItem . | ForEach-Object {Get-Content -Encoding utf8 $_ | ForEach-Object {$_ -creplace &#039 …

no image

PowerShellで右寄せ左寄せする方法

こんにちは、今日はPowerShellで右寄せ左寄せする方法についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 右寄せ "{0,5}" -f 1 …

no image

PowerShellで現在の文字セットを確認&変更する方法

確認環境 PSVersion 5.1.18362.1171 文字セットを確認 以下のようにchcpコマンドを使用すると、現在のコンソールで設定されている文字セットを表す数値である、コードページが確認で …