2. 自己紹介
高井 一輝 (Takai Kazuki)
某ISP勤務
クラウドサービスの開発、設計、設備維持
Windows Server / System Center / Linux / etc…
Microsoft MVP - Cloud and Datacenter Management
System Center User Group Japan (SCUGJ)
Twitter : @zhuky7 / Facebook : kazuki.takai
Blog : http://operationslab.wordpress.com/
3. セッションの内容
お話しすること
PowerShell Core とは何か
Windows PowerShell との違い
PowerShell Core を使うべきか
お話ししないこと
PowerShell の構文
PowerShell の使い方
Windows Server 2016 Nano Server 上の PowerShell Core 5 / 5.1
8. PowerShell 6.0 is Generally Available
PowerShell Core 6.0 GA – 2018/01/10
PowerShell Team Blog – PowerShell Core
6.0: Generally Available (GA) and
Supported!
PowerShell 6.0.1 – 2018/01/25
Engine updates
Address vulnerabilities
PowerShell 6.0.2 – 2018/03/15
Engine updates
Address vulnerabilities
Fix some bugs and Improvements
9. PowerShell Core とは
Full .NET Framework に依存しない PowerShell
.NET Core ベース
クロスプラットフォーム
Windows Client, Windows Server, Ubuntu, Debian, CentOS, Red Hat Enterprise Linux,
OpenSUSE, Fedora, macOS, Arch Linux, Kali Linux, AppImage (Linux), Windows on
ARM32/ARM64, Raspbian (Stretch)
注:公式にはサポートされないものや実験的なリリースも含む
PowerShell 6 は PowerShell Core としての最初のリリース(Nano を除く)
PowerShell 2.0 – 5.x : Windows PowerShell
PowerShell Core 5.x : PowerShell Core for Windows Server 2016 Nano Server
PowerShell 6 : PowerShell Core
10. PowerShell Core と Windows PowerShell
の主な違い
PowerShell Core Windows PowerShell
Latest Version PowerShell 6.0.2 / 6.1.0 Preview 3 PowerShell 5.1 (with WMF 5.1)
Platform / OS Windows (x86/x64/arm), Linux, macOS Windows (x86/x64)
Runtime .NET Core (.NET Core 2.0) .NET Framework
Edition ($PSEdition) Core Desktop
Executable binary pwsh (pwsh.exe) powershell.exe
WMF Independent Required
Remoting (PSRP) SSH or WinRM WinRM
Default Encoding UTF-8 (with NO BOM) UTF-16
Lifecycle Microsoft Modern Lifecycle Policy Depends on OS Lifecycle
Licensing MIT license Depends on OS license
11. Windows における PowerShell
Windows PowerShell は引き続きサポートされる
OS 及び Windows Management Framework のサポートポリシーに基づく
大幅な機能追加やエンハンスは行われない予定
GitHub label:Consider-WindowsPowerShell51
PowerShell Core は個別にインストールが必要
In-box ツールとして OS に含まれるかどうかは未定(現時点で予定無し)
Windows PowerShell を置き換える予定は、現時点では無し
PowerShell Core と Windows PowerShell は共存可能
バイナリやパスは基本的に異なる
Remoting については注意が必要
25. Windows へのインストール
Prerequisites
Windows 7 SP1 又は Windows Server 2008 R2 以降(かつサポート期間内)の OS
Windows 10 Universal C Runtime
Windows 8.1 又は Windows Server 2012 R2 以前の場合は、KB3118401 等をインストール
WMF 4.0 以降
WMF 5.1 を推奨
インストール
PowerShell-<version>-win-<os-arch>.msi をダウンロードして実行
26. Windows へのインストール
Windows Server 2016 の場合、
Microsoft Visual C++ 2015
Redistributable Update 3 のイ
ンストールは不要になりました
34. PSRP over WinRM / WSMan
注意点
Windows to Windows
Windows PowerShell と同様
ワークグループ環境で NTML を使う場合は、TrustedHosts を適切に設定する、等
Linux to Windows
Basic Auth over HTTP はサポートされない
https://github.com/PowerShell/PowerShell/pull/6787
受け側で HTTPS Transport を設定して、over HTTPS で接続
PowerShell Core に New-PSSessionOption が無い!!