差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
linux:powershell [2020/02/15 11:37] – [インストール] ともやん | linux:powershell [2020/06/08 16:39] – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== PowerShell ====== | + | < |
+ | < | ||
+ | #result pre, #mincode pre { | ||
+ | overflow: hidden; | ||
+ | font-size: 10px; | ||
+ | } | ||
+ | # | ||
+ | height: 250px; | ||
+ | overflow: scroll; | ||
+ | overflow-x: hidden; | ||
+ | font-size: 10px; | ||
+ | } | ||
+ | #mintbl table { | ||
+ | font-size: 12px; | ||
+ | } | ||
+ | .dokuwiki .plugin_wrap table { | ||
+ | width: auto; | ||
+ | } | ||
+ | #logo { | ||
+ | background-color: | ||
+ | padding: 10px; | ||
+ | width: fit-content; | ||
+ | } | ||
+ | #logo p { | ||
+ | margin: 0; | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | ====== PowerShell(Linux) | ||
[[windows: | [[windows: | ||
\\ | \\ | ||
本家: [[https:// | 本家: [[https:// | ||
ソースコード: | ソースコード: | ||
+ | \\ | ||
+ | {{linux: | ||
===== インストール ===== | ===== インストール ===== | ||
行 13: | 行 43: | ||
\\ | \\ | ||
==== Fedora 31 ==== | ==== Fedora 31 ==== | ||
+ | <WRAP prewrap 100%> | ||
< | < | ||
$ sudo dnf install https:// | $ sudo dnf install https:// | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Fedora - dnf ==== | ||
+ | [[https:// | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | # Register the Microsoft signature key | ||
+ | sudo rpm --import https:// | ||
+ | |||
+ | # Register the Microsoft RedHat repository | ||
+ | curl https:// | ||
+ | |||
+ | # Update the list of products | ||
+ | sudo dnf check-update | ||
+ | |||
+ | # Install a system component | ||
+ | sudo dnf install compat-openssl10 | ||
+ | |||
+ | # Install PowerShell | ||
+ | sudo dnf install -y powershell | ||
+ | |||
+ | # Start PowerShell | ||
+ | pwsh | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ sudo rpm --import https:// | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ curl https:// | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% #result> | ||
+ | <code powershell> | ||
+ | % Total % Received % Xferd Average Speed | ||
+ | | ||
+ | 100 | ||
+ | [packages-microsoft-com-prod] | ||
+ | name=packages-microsoft-com-prod | ||
+ | baseurl=https:// | ||
+ | enabled=1 | ||
+ | gpgcheck=1 | ||
+ | gpgkey=https:// | ||
+ | </ | ||
+ | </ | ||
===== PowerShell の実行 ===== | ===== PowerShell の実行 ===== | ||
+ | <WRAP prewrap 100%> | ||
< | < | ||
$ pwsh | $ pwsh | ||
</ | </ | ||
+ | </ | ||
+ | |||
**Release Candidate** 版の場合\\ | **Release Candidate** 版の場合\\ | ||
+ | <WRAP prewrap 100%> | ||
< | < | ||
$ pwsh-preview | $ pwsh-preview | ||
</ | </ | ||
+ | </ | ||
===== PowerShell のバージョン ===== | ===== PowerShell のバージョン ===== | ||
+ | <WRAP prewrap 100%> | ||
+ | <code powershell> | ||
+ | $ Get-Host | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% #result> | ||
<code powershell> | <code powershell> | ||
- | PS > Get-Host | ||
- | |||
Name : ConsoleHost | Name : ConsoleHost | ||
Version | Version | ||
行 40: | 行 129: | ||
IsRunspacePushed : False | IsRunspacePushed : False | ||
Runspace | Runspace | ||
+ | </ | ||
+ | </ | ||
- | + | <WRAP prewrap 100%> | |
- | PS > Get-Host | Select-Object Version | + | <code powershell> |
+ | $ Get-Host | Select-Object Version | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
Version | Version | ||
------- | ------- | ||
7.0.0-rc.2 | 7.0.0-rc.2 | ||
+ | </ | ||
+ | </ | ||
- | PS > $PSVersiontable | + | <WRAP prewrap 100%> |
+ | <code powershell> | ||
+ | $ $PSVersiontable | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | <code powershell> | ||
Name Value | Name Value | ||
---- ----- | ---- ----- | ||
行 62: | 行 164: | ||
WSManStackVersion | WSManStackVersion | ||
</ | </ | ||
+ | </ | ||