windows:powershell:variable

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
windows:powershell:variable [2020/05/29 04:24] – 作成 ともやんwindows:powershell:variable [2020/09/11 19:06] (現在) ともやん
行 2: 行 2:
  
 ===== 環境変数 ===== ===== 環境変数 =====
 +<WRAP prewrap 100%>
 <code powershell> <code powershell>
 $ Get-ChildItem env: $ Get-ChildItem env:
 </code> </code>
-<code>+</WRAP> 
 +Or\\ 
 +<WRAP prewrap 100%> 
 +<code powershell> 
 +$ gci env: 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result_long> 
 +<code powershell>
 Name                           Value Name                           Value
 ----                           ----- ----                           -----
行 56: 行 65:
 WT_SESSION                     c67b7837-ca5b-4730-b2c1-5f3dca86ba63 WT_SESSION                     c67b7837-ca5b-4730-b2c1-5f3dca86ba63
 </code> </code>
 +</WRAP>
 +Or\\
 +<WRAP prewrap 100%>
 +<code powershell>
 +$ echo $env:USERPROFILE
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +C:\Users\tomoyan
 +</code>
 +</WRAP>
  
 ===== 自動変数 ===== ===== 自動変数 =====
 +<WRAP prewrap 100%>
 <code powershell> <code powershell>
 $ Get-Variable $ Get-Variable
 </code> </code>
-<code>+</WRAP> 
 +<WRAP prewrap 100% #result_long> 
 +<code powershell>
 Name                           Value Name                           Value
 ----                           ----- ----                           -----
行 118: 行 142:
 WhatIfPreference               False WhatIfPreference               False
 </code> </code>
 +</WRAP>
 +
 +===== 参考文献 =====
 +[[https://qiita.com/Takeru/items/eb075762b7255b5f2756|PowerShellの環境変数と自動変数 - Qiita]]\\
 +[[http://www.wannko.net/windows10/etc/kankyo2.html|Windows10のpowershellでシステム環境変数・ユーザ環境変数の一覧を確認]]\\
  
  • windows/powershell/variable.1590693852.txt.gz
  • 最終更新: 2020/05/29 04:24
  • by ともやん