目的
PowerShellのprofileファイル “Microsoft.PowerShell(ISE)_profile.ps1” を作成する。
※ sh の ".profile
" や bash の ".bash_profile
" に相当するPowerShellの設定ファイル
profileファイルの場所は $profile で、あらかじめパスが指定されている。
profileファイルを置くフォルダを調べる方法から説明する。
作業手順
1. $profile の確認
1-1. PowerShell の実行例
1-2. PowerShell ISE の実行例
2. 上記フォルダの存否チェック
- 存在すれば True
- 存在しなければ False
- PowerShellセットアップ直後は「フォルダ」と「profileファイル」のいずれも存在しない。
- ファイルエクスプローラーなどでファイル/フォルダの存否を調べてもOK。
3. フォルダの作成
4. profileの作成
上記で作成したフォルダの中に(テキストエディタで)profileファイルを作成する。