{"id":2061,"date":"2019-08-31T09:35:08","date_gmt":"2019-08-31T00:35:08","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=2061"},"modified":"2019-08-31T10:25:45","modified_gmt":"2019-08-31T01:25:45","slug":"%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e3%83%95%e3%82%a9%e3%83%ab%e3%83%80%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/2061","title":{"rendered":"[PowerShell] profile\u4f5c\u6210"},"content":{"rendered":"<h3>\u76ee\u7684<\/h3>\n<p>PowerShell\u306eprofile\u30d5\u30a1\u30a4\u30eb &#8220;Microsoft.PowerShell(ISE)_profile.ps1&#8221; \u3092\u4f5c\u6210\u3059\u308b\u3002<br \/>\n\u203b <b>sh<\/b> \u306e &quot;<code>.profile<\/code>&quot; \u3084 <b>bash<\/b> \u306e &quot;<code>.bash_profile<\/code>&quot; \u306b\u76f8\u5f53\u3059\u308bPowerShell\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>profile\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u306f $profile \u3067\u3001\u3042\u3089\u304b\u3058\u3081\u30d1\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\nprofile\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304f\u30d5\u30a9\u30eb\u30c0\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u304b\u3089\u8aac\u660e\u3059\u308b\u3002<\/p>\n<h3>\u4f5c\u696d\u624b\u9806<\/h3>\n<h4>1. $profile \u306e\u78ba\u8a8d<\/h4>\n<h5>1-1. PowerShell \u306e\u5b9f\u884c\u4f8b<\/h5>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; $profile\r\nC:\\Users\\JaneDoe\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1<\/pre>\n<h5>1-2. PowerShell ISE \u306e\u5b9f\u884c\u4f8b<\/h5>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; $profile\r\nC:\\Users\\JaneDoe\\Documents\\WindowsPowerShell\\Microsoft.PowerShellISE_profile.ps1<\/pre>\n<p><!--more--><\/p>\n<h4>2. \u4e0a\u8a18\u30d5\u30a9\u30eb\u30c0\u306e\u5b58\u5426\u30c1\u30a7\u30c3\u30af<\/h4>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; test-path $profile\r\nFalse<\/pre>\n<ul>\n<li>\u5b58\u5728\u3059\u308c\u3070 <b>True<\/b><\/li>\n<li>\u5b58\u5728\u3057\u306a\u3051\u308c\u3070 <b>False<\/b><\/li>\n<\/ul>\n<ul>\n<li>PowerShell\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u76f4\u5f8c\u306f\u300c\u30d5\u30a9\u30eb\u30c0\u300d\u3068\u300cprofile\u30d5\u30a1\u30a4\u30eb\u300d\u306e\u3044\u305a\u308c\u3082\u5b58\u5728\u3057\u306a\u3044\u3002<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u306a\u3069\u3067\u30d5\u30a1\u30a4\u30eb\uff0f\u30d5\u30a9\u30eb\u30c0\u306e\u5b58\u5426\u3092\u8abf\u3079\u3066\u3082OK\u3002<\/li>\n<\/ul>\n<h4>3. \u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210<\/h4>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; mkdir C:\\Users\\JaneDone\\Documents\\WindowsPowerShell<\/pre>\n<h4>4. profile\u306e\u4f5c\u6210<\/h4>\n<p>\u4e0a\u8a18\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\uff08\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\uff09profile\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<h4>5. \u30e2\u30b8\u30e5\u30fc\u30eb\u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210<\/h4>\n<pre class=\"lang:ps decode:true \" >PS C:\\&gt; mkdir C:\\Users\\JaneDoe\\Documents\\WindowsPowerShell\\Modules<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u7684 PowerShell\u306eprofile\u30d5\u30a1\u30a4\u30eb &#8220;Microsoft.PowerShell(ISE)_profile.ps1&#8221; \u3092\u4f5c\u6210\u3059\u308b\u3002 \u203b sh \u306e &quot;.profile&#038;quo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[72],"class_list":["post-2061","post","type-post","status-publish","format-standard","hentry","category-memo","tag-powershell"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=2061"}],"version-history":[{"count":10,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2061\/revisions"}],"predecessor-version":[{"id":2262,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/2061\/revisions\/2262"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=2061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=2061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=2061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}