自己紹介
高井 一輝(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 な話はぜひ個別に(懇親会などで)
最近の動向についてなんとなく把握いただければ幸いです
ここ1年くらいの出来事 振り返り
2016/08– PowerShell ♥ Open Source / Linux
PowerShell Core v6.0.0-alpha.8 release
2016/11 – PowerShell 10th Anniversary
2017/01 – WMF 5.1 Release
2017/05 – VS Code PowerShell extension 1.0
2017/05 – PowerShell Core 6.0 Beta 1 release
Based on .NET Core 2.0
2017/09 – PowerShell in Azure Cloud Shell (Public Preview)
7.
PowerShell 6.0
PowerShell6.0 は PowerShell Core 6.0 としてリリース予定
Full .NET Framework 非依存
マルチプラットフォーム
WMF とは分離
PowerShell 5.1 は継続してサポート
ただし、大きな機能アップデートおよびマイナーなバグ修正は実施しない
今後の Windows / Windows Server に PowerShell Core がプリインストールされる
かは不明(言及が無い)
8.
Windows PowerShell vsPowerShell 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 は(未だ)動かないので注意
PowerShell in AzureCloud 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 時点
#Requires
スクリプトが動作するバージョンに制限を設けるステートメント
Specifiesthe 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 エンジンで
実行される