Slide 1

Slide 1 text

PowerShell CoreからPowerShell 7 に至る道 2019年7月27日 CLR/H #109 ~夏だ一番初心祭り~ Takuya Shibata Ver. 1.1

Slide 2

Slide 2 text

スライドは後で入手することが出来ますので 発表中の内容をメモする必要はありません。 写真撮影をする場合は フラッシュ・シャッター音が出ないようにご配慮ください Attention

Slide 3

Slide 3 text

本日のハッシュタグ #clrh109

Slide 4

Slide 4 text

Takuya Shibata (@stknohg) - クラスメソッド株式会社 - AWS事業本部 コンサルティング部 - ソリューションアーキテクト - CLR/H と きたあず の裏方です - Microsoft MVP for Cloud and Datacenter Management (2016 -) - PowerShellおじさん 4 自己紹介

Slide 5

Slide 5 text

5 はじめに 本セッションはInteract 2019でお話した内容の 再演です。

Slide 6

Slide 6 text

6 アジェンダ 1. PowerShellの歴史 2. PowerShell Core の誕生 3. PowerShell Core 6.x 4. PowerShellの目指すところ 5. PowerShell 7 に至る道 6. まとめ

Slide 7

Slide 7 text

7 PowerShellの歴史

Slide 8

Slide 8 text

8 PowerShellとは? とりあえずの 理解

Slide 9

Slide 9 text

9 PowerShellとは https://docs.microsoft.com/ja-jp/powershell/scripting/powershell-scripting

Slide 10

Slide 10 text

10 PowerShellの歴史 – その1 PowerShell 1.0 Desktop Edition Core Edition 5.1 Windows Linux Mac 2.0 3.0 4.0 5.0 2006年 2009年 2012年 2013年 2015年 2016年

Slide 11

Slide 11 text

11 PowerShell Coreの誕生

Slide 12

Slide 12 text

12 .NET Coreの誕生 .NET Coreを雑に表現すると、真のクロスプラット フォームを目論んだ.NET Frameworkの再実装 (大いに私見・偏見があります) • 機能的には.NET Frameworkのサブセット • WindowsだけでなくLinuxやmacOSも対象 • 2016年に.NET Core 1.0がリリース • 2019年7月現在.NET Core 2.2が最新

Slide 13

Slide 13 text

13 原初のPowerShell Core Nano ServerのPowerShell • PowerShell 5.1 Core Edition • .NET Core 1.0-rc2 (らしい…GitHubのコミットログより) • 闇に消えた黒歴史 この頃はまだPowerShell Coreの 呼び名は無い

Slide 14

Slide 14 text

14 オープンソース化するPowerShell 2016年8月、突如GitHubにPowerShellのリポジトリ が公開されオープンソース化

Slide 15

Slide 15 text

15 ふたつのPowerShell オープンソース化したPowerShellのバージョンは6.0 ここで従来のPowerShellと呼称が分離 (そしてソースコードも完全に分離) • Windows PowerShell • 従来のPowerShell (Ver.1.0 ~ Ver.5.1) • PowerShell Core • オープンソース化したPowerShell (Ver.6.0)

Slide 16

Slide 16 text

16 ふたつのPowerShell Windows PowerShell • PowerShell 1.0 ~ 5.1 •Desktop Edition •Windows only •.NET Framework PowerShell Core • PowerShell 6.0 ~ 6.2 + Nano Server の PowerShell 5.1 •Core Edition •Windows, Linux, macOS •.NET Core (powershell.exe) (pwsh.exe | pwsh)

Slide 17

Slide 17 text

17

Slide 18

Slide 18 text

18 Windows PowerShell と PowerShell Core PowerShell Core対応プラットフォーム • Windows 7/8.1/10 • Windows Server 2008R2/2012/2012R2/2016/2019 • Windows Server Semi-Annual Channel (SAC) • macOS 10.12+ • Ubuntu 16.04/18.04 • Debian 9 • CentOS 7 • Red Hat Enterprise Linux (RHEL) 7 • Fedora 28 • openSUSE 42.3 以下はコミュニティサポートのみ • Arch Linux • Raspbian (ARM32) • Kali Linux • Alpine • その他Linuxディストリビューション

Slide 19

Slide 19 text

19 Windows PowerShell と PowerShell Core Windows PowerShell対応プラットフォーム OS PowerShell 2.0 PowerShell 3.0 PowerShell 4.0 PowerShell 5.0 PowerShell 5.1 Window 7 SP1 Windows Server 2008 R2 SP1 インストール 済み 〇 (更新可) 〇 (更新可) 〇 (更新可) 〇 (更新可) Windows 8 Windows Server 2012 非推奨 インストール 済み 〇 (更新可) 〇 (更新可) 〇 (更新可) Windows 8.1 Windows Server 2012 R2 非推奨 - インストール 済み 〇 (更新可) 〇 (更新可) Windows 10 (初期リリース~Ver.1511) 非推奨 - - インストール 済み 〇 (更新可) Windows 10 (Ver.1607~) Windows Server 2016 Windows Server 2019 非推奨 - - - インストール 済み

Slide 20

Slide 20 text

20 PowerShellの歴史 – その2 PowerShell 1.0 PowerShell Core 6.0 Desktop Edition Core Edition PowerShell 5.1 Editionなし Windows Linux Mac PowerShell Core 6.2 Core Edition Core Edition Core Edition Core Edition Core Edition Core Edition

Slide 21

Slide 21 text

21 PowerShell Core 6.x

Slide 22

Slide 22 text

22 PowerShell Core 6.0 PowerShell Coreとして最初のリリース 多くの新機能、破壊的変更 • プログラム名の変更 (pwsh) • PowerShell Remoting over SSH • エンコーディング回り(BOM無しUTF-8が既定に) • エイリアスの見直し • & によるバックグラウンドジョブ • etc, etc, etc…

Slide 23

Slide 23 text

23 PowerShell Core 6.0 廃止された機能 • Snap-inの廃止 • Workflowの廃止 • WMI v1 Cmdletsの廃止 • トランザクションの廃止 • .NET Core非サポート機能の廃止 • etc, etc…

Slide 24

Slide 24 text

24 PowerShell Core 6.1 主にパフォーマンス改善 幾つかの新機能と互換性向上 • .NET Core 2.1化 • Windowsにおける互換性の向上 • ThreadJob • Markdown Cmdlets • etc…

Slide 25

Slide 25 text

25 PowerShell Core 6.2 主に内部処理の見直しとリファクタリング 目立った新機能はあまりない • Experimental Feature • 型アクセラレーター、サフィックスの追加 • etc…

Slide 26

Slide 26 text

26 宣伝 詳しくは私の個人ブログかDevelopers.IOを見てね! • しばたテックブログ • PowerShell Core 6.0 新機能まとめ • PowerShell Core 6.0 破壊的変更まとめ • PowerShell Core 6.1 新機能・破壊的変更まとめ • Developers.IO • PowerShell Core 6.2 新機能・破壊的変更まとめ

Slide 27

Slide 27 text

27 Demo https://storia.takeshobo.co.jp/manga/punkteen/

Slide 28

Slide 28 text

28 PowerShellの目指すところ

Slide 29

Slide 29 text

29 PowerShellは何のためのツールであったか? PowerShellはWindowsの管理と自動化のために 生まれたツール • シェルでありスクリプト言語でもある • Windows Management Framework(WMF) PowerShell Coreというクロスプラットフォームな アプリケーションとなった今、何を目指すのか?

Slide 30

Slide 30 text

30 https://www.youtube.com/watch?v=zy4fDSdrM7M

Slide 31

Slide 31 text

31 https://github.com/psconfeu/2018/blob/master/Jeffrey%20Snover/Keynote_psconfeu_2018.pdf

Slide 32

Slide 32 text

32 https://github.com/psconfeu/2018/blob/master/Jeffrey%20Snover/Keynote_psconfeu_2018.pdf

Slide 33

Slide 33 text

33 PowerShellの目指すところ クロスプラットフォームになったPowerShell • シェルでありスクリプト言語でもある • Windows Management Framework (WMF) 1. クロスプラットフォームなインフラ管理 2. デジタルトランスフォーメーションを実現 するための自動化

Slide 34

Slide 34 text

34 クラウド管理ツールとしてのPowerShell AWS : AWS Tools for PowerShell • https://aws.amazon.com/jp/powershell/ Azure : Azure PowerShell • https://docs.microsoft.com/ja-jp/powershell/azure/overview Azure Stack : PowerShell for Azure Stack • https://docs.microsoft.com/ja-jp/azure/azure-stack/azure-stack-powershell-install Google Cloud : CLOUD TOOLS FOR POWERSHELL • https://cloud.google.com/powershell/ VMware : VMware PowerCLI • https://code.vmware.com/web/dp/tool/vmware-powercli/

Slide 35

Slide 35 text

35 クラウド管理ツールとしてのPowerShell AWS : AWS Lambda • 2018年9月よりPowerShell Coreサポート Azure : Azure Functions (V2) • 2019年4月よりPowerShell Coreサポート (ただしPublic Preview)

Slide 36

Slide 36 text

36 自動化ツールとしてのPowerShell 以前の登壇資料に詳しく書いています https://www.slideshare.net/stknohg/powershell-125938281

Slide 37

Slide 37 text

37 Demo https://storia.takeshobo.co.jp/manga/punkteen/

Slide 38

Slide 38 text

38 PowerShell 7 に至る道

Slide 39

Slide 39 text

39 次のPowerShellは ”PowerShell 7” 次のリリースでメジャーバージョンアップ • PowerShell Core 7 でなく PowerShell 7 • Coreの文言が外される • Windows PowerShellの置き換えを目指す • .NET Core 3.0を基盤に • .NET Core 3.0リリース後にGA予定

Slide 40

Slide 40 text

40 PowerShell 7のロードマップ 実はまだPowerShell 7の機能は確定していない 2019年7月現在、いろいろ検討中の状態 • 複数システム間での認証情報の連携手法 • クロスプラットフォームなログ収集、ログ集約基盤 • GitHubで提案されている新しい文法

Slide 41

Slide 41 text

41 PowerShellの歴史 – その3 PowerShell 1.0 PowerShell Core 6.x Desktop Edition Core Edition PowerShell 5.1 Editionなし Windows Linux Mac PowerShell 7 Core Edition Core Edition Core Edition Core Edition Core Edition Core Edition

Slide 42

Slide 42 text

42 まだ見えていない道 以下の点はまだ決まっておらず、これからに期待 • 具体的なリリース日 • いつWindowsに標準搭載されるのか? • 最終目標だが時期は決まっていない • Windows PowerShellはディスコンするのか? • そもそもPowerShell 2.0すらディスコンしていない… • PowerShell DSCの将来はどうなるのか? • Azure Policy Guest Configurationが後継?

Slide 43

Slide 43 text

43 まとめ

Slide 44

Slide 44 text

44 まとめ 1. .NET Coreの登場によりPowerShell Coreの原型 が生まれた 2. オープンソース、クロスプラットフォームな アプリケーションとしてPowerShell Core 6.xが リリースされた 3. 次のPowerShellは「PowerShell 7」 Windows PowerShellの置き換えを目指し、 Coreの文言が取り除かれることになった 4. PowerShell 7は.NET Core 3.0のリリース後に リリース予定(具体的な日程はまだ。乞うご期待!)

Slide 45

Slide 45 text

45