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 についてお話します
ここ1年くらい
Deep Dive ではありません
Deep な話はぜひ個別に(懇親会などで)
最近の動向についてなんとなく把握いただければ幸いです
7. PowerShell 6.0
PowerShell 6.0 は PowerShell Core 6.0 としてリリース予定
Full .NET Framework 非依存
マルチプラットフォーム
WMF とは分離
PowerShell 5.1 は継続してサポート
ただし、大きな機能アップデートおよびマイナーなバグ修正は実施しない
今後の Windows / Windows Server に PowerShell Core がプリインストールされる
かは不明(言及が無い)
8. Windows PowerShell vs PowerShell Core
Windows PowerShell
Edition: Desktop
Build on .NET Framework (Full CLR)
Available on Windows
PowerShell Core
Edition: Core
Build on .NET Core 2.0 (Core CLR)
Available on Windows, Linux, macOS
9. PowerShell Core 6.0 のインストール
Windows x64
GitHub の Release ページから msi ファイルをダウンロードして実行
https://github.com/PowerShell/PowerShell/releases
Windows 10 以前の OS へインストールする場合は、Windows 10 Universal C
Runtime を事前にインストール
https://www.microsoft.com/download/details.aspx?id=50410
[暫定] Windows Server 2016 の場合、Microsoft Visual C++ 2015 Redistributable
Update 3 のインストールが必要
Install-PowerShellRemoting.ps1 は(未だ)動かないので注意
18. PowerShell in Azure Cloud Shell
PowerShell 版は Windows Server 2016 ベースで動作
Windows Server 2016 Datacenter / Server Core
Version 10.0.14393
Build 14393.1480.amd64fre.rs1_release.170706-2004
PowerShell 5.1
Version 5.1.14393.1480
Desktop Edition
※ 2017/10/14 時点
29. #Requires
スクリプトが動作するバージョンに制限を設けるステートメント
Specifies the minimum version of Windows PowerShell that the script requires.
Enter a major version number and optional minor version number.
#Requires -Version 3 とすると、PowerShell 3.0 未満では実行できない
最小バージョンを指定するもので、特定のバージョンを指定するものではない(本来)
#Require -Version 2
PowerShell 2.0 エンジンがインストールされている PowerShell 3 以降のシステムで、
#Requires -Version 2 が指定されたスクリプトを実行すると、自動的に 2.0 エンジンで
実行される
31. 参考資料
PowerShell Team Blog
https://blogs.msdn.microsoft.com/powershell/
Microsoft Ignite 2017 Video Library
https://myignite.microsoft.com/videos?q=PowerShell
GitHub
https://github.com/PowerShell