windows:powershell

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
windows:powershell [2020/08/30 16:57] – [コマンド] ともやんwindows:powershell [2023/10/06 14:49] (現在) – [インストール] ともやん
行 1: 行 1:
-<html> 
-  <style> 
-    #result pre { 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #result_long pre { 
-      height: 300px; 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-  </style> 
-</html> 
 ====== PowerShell(Windows) ====== ====== PowerShell(Windows) ======
 [[linux:powershell|PowerShell - Linux]]\\ [[linux:powershell|PowerShell - Linux]]\\
行 34: 行 19:
 } }
  
-$res curlGet('https://api.github.com/repos/PowerShell/PowerShell/tags'); +//$url = 'https://api.github.com/repos/PowerShell/PowerShell/tags'
-$tags = json_decode($res, $assoc=TRUE);+$url = 'https://github.com/PowerShell/PowerShell/releases'; 
 +//$res = curlGet($url); 
 +//$tags = json_decode($res, $assoc=TRUE);
 //$lines = explode("\n", $res); //$lines = explode("\n", $res);
-//var_dump($res); + 
-echo '最新バージョン: v7.0.1'.$lines[0];+/
 +$dom = new DOMDocument; 
 +@$dom->loadHTMLFile($url); 
 +$xpath = new DOMXPath($dom); 
 +$xpath = $xpath->query('//div[contains(@class, "release-entry")]'); 
 +var_dump($xpath); 
 +$html = array_map( 
 +    function ($node) use ($xpath) { 
 +        return [ 
 +            'html' => $xpath->saveHTML($node) 
 +        ]; 
 +    }, $xpath->query('//span[@class="css-truncate-target"]')); 
 +var_dump($html); 
 +*/ 
 +echo '最新バージョン: v7.3.6'.$lines[0];
 </php>\\ </php>\\
-\\ + 
-{{:windows:powershell_v7.0.0-rc.2.png?470|PowerShell}}\\+{{windows:powershell_v7.3.6.png?470|PowerShell}}\\
 **PowerShell** (パワーシェル)は、マイクロソフトが開発した拡張可能なコマンドラインインターフェース (CLI) シェルおよびスクリプト言語である。オブジェクト指向に基づいて設計されており、.NET Frameworkと.NET Coreを基盤としている。\\ **PowerShell** (パワーシェル)は、マイクロソフトが開発した拡張可能なコマンドラインインターフェース (CLI) シェルおよびスクリプト言語である。オブジェクト指向に基づいて設計されており、.NET Frameworkと.NET Coreを基盤としている。\\
-\\+
 かつては Microsoft Shell (MSH、コードネーム Monad) と呼ばれていた。\\ かつては Microsoft Shell (MSH、コードネーム Monad) と呼ばれていた。\\
-\\+
 Windows 7 以降のオペレーティングシステム (OS) には標準で搭載されている。\\ Windows 7 以降のオペレーティングシステム (OS) には標準で搭載されている。\\
-\\ 
  
 ===== インストール ===== ===== インストール =====
 [[windows:scoop|Scoop]] によるインストール\\ [[windows:scoop|Scoop]] によるインストール\\
-<code powershell+ 
-PS > scoop bucket add dorado https://github.com/h404bi/dorado +dorado バケットを追加する😉\\ 
-</code> +<WRAP color_term> 
-<WRAP prewrap 100% #result+<WRAP color_command><html><pre
-<code>+PS > <b class=HIY>scoop</b> bucket add dorado https://github.com/chawyehsu/dorado 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 Checking repo... ok Checking repo... ok
-The dorado bucket was added successfully. +<b class=GRN>The dorado bucket was added successfully.</b> 
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
  
-**Powershell** のインストール\\ +**PowerShell** のインストール\\ 
-<code powershell+<WRAP color_term> 
-PS > scoop install powershell +<WRAP color_command><html><pre
-</code> +PS > <b class=HIY>scoop</b> install powershell 
-<WRAP prewrap 100% #result+</pre></html></WRAP> 
-<code+<WRAP color_result><html><pre
-Installing 'powershell' (6.2.4) [64bit] +Installing 'powershell' (7.3.6) [64bit] 
-PowerShell-6.2.4-win-x64.zip (55.MB) [======================================================================] 100% +PowerShell-7.3.6-win-x64.zip (102.MB) [=====================================================================] 100% 
-Checking hash of PowerShell-6.2.4-win-x64.zip ... ok. +Checking hash of <b class=CYN>PowerShell-7.3.6-win-x64.zip</b> ... <b class=GRN>ok.</b> 
-Extracting PowerShell-6.2.4-win-x64.zip ... done. +Extracting <b class=CYN>PowerShell-7.3.6-win-x64.zip</b> ... <b class=GRN>done.</b> 
-Linking ~\scoop\apps\powershell\current => ~\scoop\apps\powershell\6.2.4+Linking ~\scoop\apps\powershell\current => ~\scoop\apps\powershell\7.3.6
 Creating shim for 'pwsh'. Creating shim for 'pwsh'.
-Creating shortcut for PowerShell Core (pwsh.exe) +Creating shortcut for PowerShell (pwsh.exe) 
-'powershell' (6.2.4) was installed successfully! +<b class=GRN>'powershell' (7.3.6) was installed successfully!</b> 
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
  
-**Powershell** のグローバルインストール\\ +**PowerShell** のグローバルインストール\\ 
-<code powershell+<WRAP color_term> 
-PS > sudo scoop install -g powershell +<WRAP color_command><html><pre
-</code> +PS > <b class=HIY>sudo</b> scoop install -g powershell 
-<WRAP prewrap 100% #result+</pre></html></WRAP> 
-<code>+<WRAP color_result><html><pre>
 Installing 'powershell' (7.0.0) [64bit] Installing 'powershell' (7.0.0) [64bit]
 PowerShell-7.0.0-win-x64.zip (88.7 MB) [======================================================================] 100% PowerShell-7.0.0-win-x64.zip (88.7 MB) [======================================================================] 100%
-Checking hash of PowerShell-7.0.0-win-x64.zip ... ok. +Checking hash of <b class=CYN>PowerShell-7.0.0-win-x64.zip</b> ... <b class=GRN>ok.</b> 
-Extracting PowerShell-7.0.0-win-x64.zip ... done.+Extracting <b class=CYN>PowerShell-7.0.0-win-x64.zip</b> ... <b class=GRN>done.</b>
 Linking C:\ProgramData\scoop\apps\powershell\current => C:\ProgramData\scoop\apps\powershell\7.0.0 Linking C:\ProgramData\scoop\apps\powershell\current => C:\ProgramData\scoop\apps\powershell\7.0.0
 Creating shim for 'pwsh'. Creating shim for 'pwsh'.
 Creating shortcut for PowerShell (pwsh.exe) Creating shortcut for PowerShell (pwsh.exe)
-'powershell' (7.0.0) was installed successfully! +<b class=GRN>'powershell' (7.0.0) was installed successfully!</b> 
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
  
-**Powershell(Preview版)** のインストール\\ +**PowerShell(Preview版)** のインストール\\ 
-<code powershell+<WRAP color_term> 
-PS > scoop install powershell-preview+<WRAP color_command><html><pre
 +PS > <b class=HIY>scoop</b> install powershell-preview
 </code> </code>
-<WRAP prewrap 100% #result+</pre></html></WRAP> 
-<code>+<WRAP color_result><html><pre>
 Installing 'powershell-preview' (7.0.0-rc.3) [64bit] Installing 'powershell-preview' (7.0.0-rc.3) [64bit]
 PowerShell-7.0.0-rc.3-win-x64.zip (88.8 MB) [=================================================================] 100% PowerShell-7.0.0-rc.3-win-x64.zip (88.8 MB) [=================================================================] 100%
-Checking hash of PowerShell-7.0.0-rc.3-win-x64.zip ... ok. +Checking hash of <b class=CYN>PowerShell-7.0.0-rc.3-win-x64.zip</b> ... <b class=GRN>ok.</b> 
-Extracting PowerShell-7.0.0-rc.3-win-x64.zip ... done.+Extracting <b class=CYN>PowerShell-7.0.0-rc.3-win-x64.zip</b> ... <b class=GRN>done.</b>
 Linking ~\scoop\apps\powershell-preview\current => ~\scoop\apps\powershell-preview\7.0.0-rc.3 Linking ~\scoop\apps\powershell-preview\current => ~\scoop\apps\powershell-preview\7.0.0-rc.3
 Creating shim for 'pwsh'. Creating shim for 'pwsh'.
 WARN  Overwriting shim to pwsh.exe installed from powershell WARN  Overwriting shim to pwsh.exe installed from powershell
 Creating shortcut for PowerShell Preview (pwsh.exe) Creating shortcut for PowerShell Preview (pwsh.exe)
-'powershell-preview' (7.0.0-rc.3) was installed successfully! +<b class=GRN>'powershell-preview' (7.0.0-rc.3) was installed successfully!</b> 
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
  
行 121: 行 124:
 [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.2|Releases · PowerShell/PowerShell - Release Candidate 2]]\\ [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.2|Releases · PowerShell/PowerShell - Release Candidate 2]]\\
 [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.3|Releases · PowerShell/PowerShell - Release Candidate 3]]\\ [[https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.3|Releases · PowerShell/PowerShell - Release Candidate 3]]\\
 +
 +===== 変数 =====
 +[[.powershell:variable|環境変数/自動変数/ユーザ定義変数]]\\
 +
 +===== コマンド =====
 +[[.powershell:commands|PowerShell コマンド]]\\
 +[[.powershell:remote-commands|PowerShell リモートコマンド実行]]\\
 +[[.powershell:commands:get-alias|PowerShell エイリアス Get-Alias (alias: gal)]]\\
 +[[.powershell:commands:get-command|PowerShell コマンド情報取得[where/which] Get-Command (alias: gcm)]]\\
 +[[.powershell:call_command_prompt_interpreter_command|PowerShell からコマンドプロンプトのインタープリタコマンドの呼び出し]]\\
 +
 +===== コマンド履歴 =====
 +<code powershell>
 +$ less (Get-PSReadlineOption).HistorySavePath
 +</code>
 +
 +<code powershell>
 +$ cat (Get-PSReadlineOption).HistorySavePath | grep "scoop search"
 +</code>
  
 ===== PowerShellGet ===== ===== PowerShellGet =====
行 184: 行 206:
 ==== 参考文献 ==== ==== 参考文献 ====
 [[https://github.com/lukesampson/scoop/wiki/Theming-Powershell|Theming Powershell · lukesampson/scoop Wiki · GitHub]]\\ [[https://github.com/lukesampson/scoop/wiki/Theming-Powershell|Theming Powershell · lukesampson/scoop Wiki · GitHub]]\\
- 
-===== 変数 ===== 
-[[.:powershell:variable|環境変数/自動変数/ユーザ定義変数]]\\ 
- 
-===== コマンド ===== 
-[[.:powershell:commands|PowerShell コマンド]]\\ 
-[[.:powershell:remote-commands|PowerShell リモートコマンド実行]]\\ 
-[[.:powershell:commands:get-alias|PowerShell エイリアス Get-Alias (alias: gal)]]\\ 
-[[.:powershell:commands:get-command|PowerShell Get-Command (alias: gcm)]]\\ 
  
 ===== PowerShell のバージョン ===== ===== PowerShell のバージョン =====
行 254: 行 267:
 ===== 参考文献 ===== ===== 参考文献 =====
 [[http://www.vwnet.jp/windows/etc.asp#PowerShell|PowerShell - vwnet.jp]]\\ [[http://www.vwnet.jp/windows/etc.asp#PowerShell|PowerShell - vwnet.jp]]\\
-[[https://github.com/PowerShell/Win32-OpenSSH/releases|Releases · PowerShell/Win32-OpenSSH · GitHub]]\\ +[[git>PowerShell/Win32-OpenSSH/releases|Releases · PowerShell/Win32-OpenSSH · GitHub]]\\ 
-\\+
 [[https://binary-pulsar.hatenablog.jp/entry/2018/09/01/000000|]]\\ [[https://binary-pulsar.hatenablog.jp/entry/2018/09/01/000000|]]\\
-\\+
 [[https://stackoverflow.com/questions/2124753/how-can-i-use-powershell-with-the-visual-studio-command-prompt|How can I use PowerShell with the Visual Studio Command Prompt? - Stack Overflow]]\\ [[https://stackoverflow.com/questions/2124753/how-can-i-use-powershell-with-the-visual-studio-command-prompt|How can I use PowerShell with the Visual Studio Command Prompt? - Stack Overflow]]\\
 [[https://archive.codeplex.com/?p=pscx|PowerShell Community Extensions - CodePlex Archive]]\\ [[https://archive.codeplex.com/?p=pscx|PowerShell Community Extensions - CodePlex Archive]]\\
行 263: 行 276:
 [[https://rkeithhill.wordpress.com/|Keith Hill's Blog | Just another WordPress.com site]]\\ [[https://rkeithhill.wordpress.com/|Keith Hill's Blog | Just another WordPress.com site]]\\
 [[https://www.powershellgallery.com/|PowerShell Gallery | Home]]\\ [[https://www.powershellgallery.com/|PowerShell Gallery | Home]]\\
 +
 +[[https://www.vwnet.jp/Windows/w10/PSHistry.htm|PowerShell の入力履歴]]\\
 +[[https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell|How to use vcvars64.bat from Powershell? / Questions / Discussion Area - AppVeyor Support]]\\
 +[[git>microsoft/vcpkg/blob/2020.11/scripts/bootstrap.ps1#L68|vcpkg/bootstrap.ps1 at 2020.11 · microsoft/vcpkg]]\\
 +[[https://stackoverflow.com/questions/26998968/passing-variables-between-powershell-commands-in-a-python-script|Passing variables between Powershell commands in a python script]]\\
  
  • windows/powershell.1598774238.txt.gz
  • 最終更新: 2020/08/30 16:57
  • by ともやん