SlideShare a Scribd company logo
1 of 34
Download to read offline
PowerShell 5.0 で広がる
運用管理の世界
Interact × Cloud Samurai Roadshow 2015 年 7月 (2015.07.11)
Kazuki Takai – System Center User Group Japan
自己紹介
 高井 一輝 (Takai Kazuki)
 某ISP勤務
 クラウドサービスの開発、設計、設備維持
 Windows Server / System Center / Linux / etc…
 System Center User Group Japan (SCUGJ)
 Twitter : @zhuky7 / Facebook : kazuki.takai
 Blog : http://operationslab.wordpress.com/
2
本日の内容
 本日の内容 (お話しすること)
 PowerShell 5.0 / WMF 5.0 を中心とした運用管理系のテクノロジー、ソリューション
 標準コマンドレットの拡充
 構成管理 (Desired State Configuration)
 パッケージ管理 (Package Manager)
 セキュリティの強化 (Just Enough Administration、Just in Time Administration/PAM)
 お話ししないこと
 運用管理に直接関係ない PowerShell 5.0 の新機能
 各機能の細かい仕様や設定方法
3
セッションのゴール
 PowerShell と周辺のテクノロジーを組み合わせることで、
何ができるかをイメージできる
 PowerShell を (より) 使ってみたくなる
4
はじめる前に
 このセッションでは Preview 版の製品、テクノロジーについて記載しています
 2015/07 時点の情報をベースにしています
 今後のリリースで機能や動作が変更、削除される可能性があります
 主に、Windows PowerShell 5.0 について記載します
 厳密には、PowerShell 5.0 の新機能ではないものも含まれています
 Windows Server 2016 の新機能に紐づく個々のコマンドレットについては
(ほとんど) 記載しません
5
本日の環境
 WMF 5.0 Preview
 Windows 10 Pro Insider Preview (Build 10162, 10166)
 Windows Server 2016 TP2 (Build 10072)
 Package Repository, MIM
 Windows Server 2012 R2
 Windows 8.1
6
Windows Server と PowerShell
 Windows Server の進化とともに、PowerShell も進化
 PowerShell 1.0 : Windows Server 2003, Windows XP, Vista の追加コンポーネント
 PowerShell 2.0 : Windows Server 2008 R2 に標準搭載 (2003 – 2008 対応)
 PowerShell 3.0 : Windows Server 2012 に標準搭載 (2008, 2008 R2 対応)
 PowerShell 4.0 : Windows Server 2012 R2 に標準搭載 (2008 R2, 2012 対応)
 PowerShell 5.0 : Windows Server 2016 に標準搭載予定 (2008 R2 – 2012 R2 対応?)
 デフォルトで有効化
 Windows 10 にも搭載予定!?
7
2012 R2 vs 2016
8
 Windows Server 2012 R2
 Build Version : 6.3.9600.16394
 Windows Server 2012 R2 with KB3000850
 Build Version : 6.3.9600.17400
 Windows Server 2016 TP2
 Build Version : 10.0.10074.0
 Windows Server 2012 R2 with WMF 5.0 Preview
 Build Version : 10.0.10105.0
 Windows 10 Insider Preview
 Build Version : 10.0.10162.0 (Slow Ring), 10.0.10166.0 (Fast Ring)
WMF 5.0 Preview April 2015
 2015/07/10 現在、以下の OS に対応
 Windows Server 2012 R2, Windows 8.1
 Windows Server 2012
 Windows Server 2008 R2, Windows 7
 KB3055381 or KB3055377 or KB2908075 をインストールすることで利用可能
 OS 毎に指定の KB をインストール
 詳細はリリースノートを参照
 英語の言語パックがインストールされていない環境ではインストールに失敗する(かも)
9
PowerShell 5.0 の新機能
 PackageManagement を使用したソフトウェアのインストール
 PowerShellGet を使用したモジュールの管理
 クラスの定義
 デバッグ関連の機能追加(拡充)
 DSC 関連の機能追加
 OData エンドポイントからコマンドレットを生成
 監査/ロギング機能の強化
 ネットワークスイッチ管理のためのコマンドレット追加
 ZIP ファイルの操作
 シンボリックリンク関連の機能強化
 文字列から構造化オブジェクトを生成
 etc...
10
本日紹介する機能
 標準コマンドレットの拡充
 PowerShell Direct
 Remote Copy
 etc...
 構成管理
 DSC (Windows/Linux)
 パッケージ管理
 Package Management
 PowerShell Get
 セキュリティの強化
 Just Enough Administration
 Just in Time Administration/PAM
11
標準コマンドレットの拡充
 運用管理面で便利なコマンドレッド、スイッチの追加および機能の拡張
 PowerShell Direct
 Remote Copy
 Transcript
 Get-Clipboard, Set-Clipboard
 Compress-Archive, Expand-Archive
 -Recurse with -Depth
 -NoNewLine
 -ItemType SymbolicLink
12
PowerShell Direct
 Hyper-V ホストからゲスト VM に対してアクセス可能
 ホストからゲストへの PSSession
 Hyper-V ゲストサービス不要
 PowerShell Remoting 構成不要
 ネットワーク接続不要
 Enter-PSSession / Invoke-Command
 New-PSSession では使用できない (少なくとも Preview においては)
 Copy-VMFile と組み合わせると、初期構成が可能
13
PowerShell Direct
 注意点
 ホスト、ゲストともに Windows 10 or Windows Server 2016 である必要がある
 評価上の注意点
 ホストとゲストの組み合わせにより、うまく動作しない場合がある
 Windows 10 Insider Preview Build 10162 -> Windows Server 2016 TP2 Build 10072 : NG
 Windows 10 Insider Preview Build 10162 -> Windows 10 Insider Preview Build 10166 : OK
 Windows Server 2016 TP2 Build 10072 -> Windows Server 2016 TP2 Build 10072 : OK
 なるべく同じ Build Version を使用する
14
Remote Copy
 PSSession 経由でアイテムのコピーが可能
 Session は事前に確立しておく必要あり (New-PSSession)
 Copy-Item コマンドレットの追加パラメータを使用
 -FromSession
 -ToSession
 SSH (SCP) のような使い方が可能に!
15
監査/ロギング機能の強化
 Transcripting の改善
 ファイル名自動生成機能 (保存先フォルダーのみ指定)
 コマンド実行時刻の自動記録が可能
 外部コマンドの出力を記録可能
 Script Block のロギング
 全てのスクリプトブロックをイベントログへ記録
 Microsoft-Windows-PowerShell/Operational
 グループポリシーで有効化
 Administrative Templates -> Windows Components -> Windows PowerShell
16
※ BuildVersion 6.3.9600.17400 以降で利用可能
Script Block のロギング
17
※ BuildVersion 6.3.9600.17400 以降で利用可能
Demo
New & Update Cmdlets
18
 PowerShell Direct
 Remote Copy
 Transcript
Desired State Configuration (DSC)
 Windows PowerShell Desired State Configuration
 サーバーの構成と管理を行うための機能
 操作 (構築) 手順ではなく、状態を記述することでサーバーを自動構成
 DSC によるサーバーの構成手順
 PowerShell で構成後のサーバーの状態を定義
 PowerShell コードから構成データが含まれる MOF ファイルを生成
 MOF ファイルを使用してサーバーを構成
19
DSC 関連の機能追加
 複数コンピューター間でのリソース依存関係の記述 (Wait for All/Any)
 DSC リソース実行時のアカウント指定 (Run as Credential)
 Linux サーバへの適用 (DSC for Linux)
 64bit 環境における 32bit プロセス環境 (WOW64) の構成をサポート
 Configuration Status の集中管理 (情報の集約/レポーティング)
 PowerShell ISE の DSC 編集サポートの強化
 DSC Local Configuration Manager 向けの Meta-Configuration Attribute
 DSC Configuration の分割記述
 ConfigurationRepositoryWeb 経由で外部の記述をインポート
20
DSC 関連の機能追加
 追加のリソース
 PowerShell Gallery (など) からダウンロード
 PowerShellGet を使用してインストール
 (または) モジュールフォルダーに手動で展開
 PowerShell DSC for Linux
 http://www.microsoft.com/en-us/download/details.aspx?id=46919
 ダウンロードファイル (パッケージ) 内に、以下が含まれる
 Windows Server (PowerShell) 上で利用可能な Linux 向けの DSC リソース (nx)
 Linux 用の DSC パッケージ
21
Demo  Local Configuration (User)
 Wait for & Run as Credential
 DSC for Linux
Desired State Configuration
22
PackageManager
 リポジトリベースのパッケージ管理システム
 コアシステム
 管理用のコマンドレット
 PowerShell 上から操作・管理可能
 *-Package コマンドレット群
 リポジトリの追加が可能
 *-PackageProvider
23
うまく動かないときは
 NuGet プロバイダが登録されているか確認する
 初めて Find-Package, Install-Package, Find-Module, Install-Module などを
実行した際に、NuGet プロバイダ用のファイルをインストールするか確認される
 NuGet プロバイダが追加されていない場合は、以下コマンドレットが必要
 Get-PackageProvider –Name NuGet –ForceBootstrap
 追加プロバイダーの保存先
 管理者として実行した場合 : $env:PROGRAMFILES¥OneGet¥ProviderAssemblies
 それ以外の場合 : $env:LOCALAPPDATA¥OneGet¥ProviderAssemblies
24
NuGet プロバイダーの追加
25
PowerShellGet
 PowerShell のモジュールや DSC リソースを管理するための仕組み
 リポジトリからモジュールやリソースをダウンロードしてインストール
 *-Module / *-DscResource コマンドレット群
 リポジトリの追加や変更が可能
 Register-PSRepository / Unregister-PSRepository
 Get-PSRepogitory / Set-PSRepogitory
26
ローカルリポジトリ
 内部の (管理された) リポジトリを使用可能
 パッケージをホスト (ダウンロード) 可能なサーバー
 パッケージ情報をフィードする仕組み
 上記 2 点を満たすサーバーであれば、リポジトリとして利用可能
 お手軽に試す場合は…
 NuGet.Server などを利用可能
27
Demo
Package & Module
Management
28
 Package Management
 PowerShellGet
 Local Repository
セキュリティ
 JEA (Just Enough Administration)
 実行可能な操作やアクセス可能なオブジェクトを制限
 Just-in-Time Admin Access
 MIM (Microsoft Identity Manager) と連携して、必要なときのみ権限を付与
 Privileged groups / TTL
 ロギング・監査機能の強化
 前述
29
Just Enough Administration
 利用可能なコマンドレットを制限する仕組み
 事前に、専用のエンドポイントを作成
 エンドポイントに対して、利用可能なコマンドレットやパラメータを設定
 作業時は、エンドポイントに接続して操作
 New-PSSession などのコマンドレットで、-ConfigurationName を指定
 エンドポイント環境内では、事前の構成に従って、実行可能なコマンドレットや
指定可能なパラメータが制限される
 構成には DSC の xJEA リソースを使用 (すると、簡単に設定可能)
30
JIT Admin (PAM)
31
 Just-In-Time Administration
 必要な時だけ、期限を区切って特権を取得することで、よりセキュアに
 ワークフローへの組み込みなども可能
 Active Directory Domain Service と Microsoft Identity Manager を使用
 普段利用しているドメインアカウントからは権限を削除
 リクエストに応じて、MIM が動的に権限を付与 (セキュリティグループへ追加)
 あらかじめ設定された、またはリクエストされた TTL を経過すると、
Kerberos チケットが失効
 特権取得のリクエストに PowerShell を使用可能
Demo
Security
32
 Just Enough Administration
 JIT Admin
まとめ
 PowerShell 5.0 は着実に進化
 DSCの利用範囲/適用範囲が拡大
 ソフトウェア/モジュールのインストール簡易化
 セキュリティの強化
 まずは利用してみる!
33
参考資料
 What‘s New in Windows PowerShell – TechNet
 http://technet.microsoft.com/en-us/library/hh857339.aspx
 Windows PowerShell Blog
 http://blogs.msdn.com/b/powershell/
 PowerShell Gallery
 https://www.powershellgallery.com/
34

More Related Content

What's hot

Windows Azure and PowerShell DSC
Windows Azure and PowerShell DSCWindows Azure and PowerShell DSC
Windows Azure and PowerShell DSCKazuki Takai
 
1st step LogicFlow
1st step LogicFlow1st step LogicFlow
1st step LogicFlowTomoyuki Obi
 
Past and Future of PowerShell
Past and Future of PowerShellPast and Future of PowerShell
Past and Future of PowerShellKazuki Takai
 
20180630 data transformationusinglogicflow
20180630 data transformationusinglogicflow20180630 data transformationusinglogicflow
20180630 data transformationusinglogicflowTomoyuki Obi
 
Introducing Windows Terminal
Introducing Windows TerminalIntroducing Windows Terminal
Introducing Windows TerminalKazuki Takai
 
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか?
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか? [SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか?
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか? de:code 2017
 
それでも僕はユニットテストを書きたい - Pester powered by PowerShell
それでも僕はユニットテストを書きたい - Pester powered by PowerShellそれでも僕はユニットテストを書きたい - Pester powered by PowerShell
それでも僕はユニットテストを書きたい - Pester powered by PowerShellHidari Ikw
 
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!decode2016
 
PowerShell and Release Management Server
PowerShell and  Release Management ServerPowerShell and  Release Management Server
PowerShell and Release Management ServerKazushi Kamegawa
 
Team Foundation Server入門
Team Foundation Server入門Team Foundation Server入門
Team Foundation Server入門Akihiro Nakajima
 
PowerShell の基本操作とリモーティング&v3のご紹介 junichia
PowerShell の基本操作とリモーティング&v3のご紹介 junichiaPowerShell の基本操作とリモーティング&v3のご紹介 junichia
PowerShell の基本操作とリモーティング&v3のご紹介 junichiajunichi anno
 
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~de:code 2017
 
[MR09] デスクトップ アプリをストアから配布するための A to Z
[MR09] デスクトップ アプリをストアから配布するための A to Z[MR09] デスクトップ アプリをストアから配布するための A to Z
[MR09] デスクトップ アプリをストアから配布するための A to Zde:code 2017
 
Getting started with Windows Containers
Getting started with Windows ContainersGetting started with Windows Containers
Getting started with Windows ContainersKazuki Takai
 
System Center Operations Manager 2019
System Center Operations Manager 2019System Center Operations Manager 2019
System Center Operations Manager 2019Norio Sashizaki
 
Intuneによるパッチ管理
Intuneによるパッチ管理Intuneによるパッチ管理
Intuneによるパッチ管理Suguru Kunii
 

What's hot (19)

Windows Azure and PowerShell DSC
Windows Azure and PowerShell DSCWindows Azure and PowerShell DSC
Windows Azure and PowerShell DSC
 
DSC 再入門
DSC 再入門DSC 再入門
DSC 再入門
 
1st step LogicFlow
1st step LogicFlow1st step LogicFlow
1st step LogicFlow
 
Past and Future of PowerShell
Past and Future of PowerShellPast and Future of PowerShell
Past and Future of PowerShell
 
20180630 data transformationusinglogicflow
20180630 data transformationusinglogicflow20180630 data transformationusinglogicflow
20180630 data transformationusinglogicflow
 
Introducing Windows Terminal
Introducing Windows TerminalIntroducing Windows Terminal
Introducing Windows Terminal
 
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか?
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか? [SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか?
[SC03] Active Directory の DR 対策~天災/人災/サイバー攻撃、その時あなたの IT 基盤は利用継続できますか?
 
それでも僕はユニットテストを書きたい - Pester powered by PowerShell
それでも僕はユニットテストを書きたい - Pester powered by PowerShellそれでも僕はユニットテストを書きたい - Pester powered by PowerShell
それでも僕はユニットテストを書きたい - Pester powered by PowerShell
 
TFSを支える技術
TFSを支える技術TFSを支える技術
TFSを支える技術
 
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!
INF-009_PowerShell を 使いこなして、自動化対応 エンジニア になろう!!
 
Windows Azure PHP Tips
Windows Azure PHP Tips Windows Azure PHP Tips
Windows Azure PHP Tips
 
PowerShell and Release Management Server
PowerShell and  Release Management ServerPowerShell and  Release Management Server
PowerShell and Release Management Server
 
Team Foundation Server入門
Team Foundation Server入門Team Foundation Server入門
Team Foundation Server入門
 
PowerShell の基本操作とリモーティング&v3のご紹介 junichia
PowerShell の基本操作とリモーティング&v3のご紹介 junichiaPowerShell の基本操作とリモーティング&v3のご紹介 junichia
PowerShell の基本操作とリモーティング&v3のご紹介 junichia
 
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~
[TL10] Azure IaaS 構築・運用・管理の専門家が語る DevTest Labs ~高速・費用無駄ナシ・簡単管理を実現する開発・テスト環境の構築~
 
[MR09] デスクトップ アプリをストアから配布するための A to Z
[MR09] デスクトップ アプリをストアから配布するための A to Z[MR09] デスクトップ アプリをストアから配布するための A to Z
[MR09] デスクトップ アプリをストアから配布するための A to Z
 
Getting started with Windows Containers
Getting started with Windows ContainersGetting started with Windows Containers
Getting started with Windows Containers
 
System Center Operations Manager 2019
System Center Operations Manager 2019System Center Operations Manager 2019
System Center Operations Manager 2019
 
Intuneによるパッチ管理
Intuneによるパッチ管理Intuneによるパッチ管理
Intuneによるパッチ管理
 

Similar to PowerShell 5.0 で広がる運用管理の世界

SC2012 VMM SP1 Update ヒーロー島 版
SC2012 VMM SP1 Update ヒーロー島 版SC2012 VMM SP1 Update ヒーロー島 版
SC2012 VMM SP1 Update ヒーロー島 版Kishima Masakazu
 
Recap: PowerShell Core
Recap: PowerShell CoreRecap: PowerShell Core
Recap: PowerShell CoreKazuki Takai
 
Windows Admin Center 2103.2 and Windows Admin Center on Azure
Windows Admin Center 2103.2 and Windows Admin Center on AzureWindows Admin Center 2103.2 and Windows Admin Center on Azure
Windows Admin Center 2103.2 and Windows Admin Center on AzureNorio Sashizaki
 
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)wind06106
 
最近の PowerShell のお話
最近の PowerShell のお話最近の PowerShell のお話
最近の PowerShell のお話Kazuki Takai
 
Dep006 クラウド的オンプ
Dep006 クラウド的オンプDep006 クラウド的オンプ
Dep006 クラウド的オンプTech Summit 2016
 
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 Story
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 StoryWindows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 Story
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 StoryNorio Sashizaki
 
System centerを中心とした統合管理-オンプレミスからクラウドまで
System centerを中心とした統合管理-オンプレミスからクラウドまでSystem centerを中心とした統合管理-オンプレミスからクラウドまで
System centerを中心とした統合管理-オンプレミスからクラウドまでMasahiko Ebisuda
 
17-D-1 Azure開発の極意 ~2011年版~
17-D-1 Azure開発の極意 ~2011年版~17-D-1 Azure開発の極意 ~2011年版~
17-D-1 Azure開発の極意 ~2011年版~Sunao Tomita
 
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリTakayoshi Tanaka
 
デスクトップ アプリ開発における Visual Studio の進化
デスクトップ アプリ開発における Visual Studio の進化デスクトップ アプリ開発における Visual Studio の進化
デスクトップ アプリ開発における Visual Studio の進化Katsuhiro Aizawa
 
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryWindows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryNorio Sashizaki
 
Azure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesAzure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesKazushi Kamegawa
 
Windows Server 2016 Essentials TP4の強化ポイントと PowerShellの使いどころ
Windows Server 2016 Essentials TP4の強化ポイントとPowerShellの使いどころWindows Server 2016 Essentials TP4の強化ポイントとPowerShellの使いどころ
Windows Server 2016 Essentials TP4の強化ポイントと PowerShellの使いどころSatoru Nasu
 
Pivotal Application Service とProject riff
Pivotal Application Service とProject riffPivotal Application Service とProject riff
Pivotal Application Service とProject riffTakayuki Kabu
 
Windows 7 オプショナルツール 一挙紹介
Windows 7 オプショナルツール 一挙紹介Windows 7 オプショナルツール 一挙紹介
Windows 7 オプショナルツール 一挙紹介shigeya
 
App controllerとwindows azure packで作る大規模プライベートクラウド
App controllerとwindows azure packで作る大規模プライベートクラウドApp controllerとwindows azure packで作る大規模プライベートクラウド
App controllerとwindows azure packで作る大規模プライベートクラウドTakashi Kanai
 

Similar to PowerShell 5.0 で広がる運用管理の世界 (20)

20070310
2007031020070310
20070310
 
SC2012 VMM SP1 Update ヒーロー島 版
SC2012 VMM SP1 Update ヒーロー島 版SC2012 VMM SP1 Update ヒーロー島 版
SC2012 VMM SP1 Update ヒーロー島 版
 
Recap: PowerShell Core
Recap: PowerShell CoreRecap: PowerShell Core
Recap: PowerShell Core
 
Windows Admin Center 2103.2 and Windows Admin Center on Azure
Windows Admin Center 2103.2 and Windows Admin Center on AzureWindows Admin Center 2103.2 and Windows Admin Center on Azure
Windows Admin Center 2103.2 and Windows Admin Center on Azure
 
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)
Cloud OS Tech Day 2014:Windows Azure Pack プライベートクラウドとセルフポータル(仮)
 
最近の PowerShell のお話
最近の PowerShell のお話最近の PowerShell のお話
最近の PowerShell のお話
 
Dep006 クラウド的オンプ
Dep006 クラウド的オンプDep006 クラウド的オンプ
Dep006 クラウド的オンプ
 
Monitoring あれこれ
Monitoring あれこれMonitoring あれこれ
Monitoring あれこれ
 
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 Story
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 StoryWindows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 Story
Windows Admin Center 2020年7月のお話 / Windows Admin Center July 2020 Story
 
System centerを中心とした統合管理-オンプレミスからクラウドまで
System centerを中心とした統合管理-オンプレミスからクラウドまでSystem centerを中心とした統合管理-オンプレミスからクラウドまで
System centerを中心とした統合管理-オンプレミスからクラウドまで
 
17-D-1 Azure開発の極意 ~2011年版~
17-D-1 Azure開発の極意 ~2011年版~17-D-1 Azure開発の極意 ~2011年版~
17-D-1 Azure開発の極意 ~2011年版~
 
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ
20150530 めとべや東京 Reactive Property + Livetで作るWPFアプリ
 
デスクトップ アプリ開発における Visual Studio の進化
デスクトップ アプリ開発における Visual Studio の進化デスクトップ アプリ開発における Visual Studio の進化
デスクトップ アプリ開発における Visual Studio の進化
 
Clrh 20121215
Clrh 20121215Clrh 20121215
Clrh 20121215
 
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryWindows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
 
Azure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure PipelinesAzure DevOps Online Vol.3 - Inside Azure Pipelines
Azure DevOps Online Vol.3 - Inside Azure Pipelines
 
Windows Server 2016 Essentials TP4の強化ポイントと PowerShellの使いどころ
Windows Server 2016 Essentials TP4の強化ポイントとPowerShellの使いどころWindows Server 2016 Essentials TP4の強化ポイントとPowerShellの使いどころ
Windows Server 2016 Essentials TP4の強化ポイントと PowerShellの使いどころ
 
Pivotal Application Service とProject riff
Pivotal Application Service とProject riffPivotal Application Service とProject riff
Pivotal Application Service とProject riff
 
Windows 7 オプショナルツール 一挙紹介
Windows 7 オプショナルツール 一挙紹介Windows 7 オプショナルツール 一挙紹介
Windows 7 オプショナルツール 一挙紹介
 
App controllerとwindows azure packで作る大規模プライベートクラウド
App controllerとwindows azure packで作る大規模プライベートクラウドApp controllerとwindows azure packで作る大規模プライベートクラウド
App controllerとwindows azure packで作る大規模プライベートクラウド
 

More from Kazuki Takai

Azure Arc Automanage Machine Configuration による構成の管理と適用
Azure Arc Automanage Machine Configuration による構成の管理と適用Azure Arc Automanage Machine Configuration による構成の管理と適用
Azure Arc Automanage Machine Configuration による構成の管理と適用Kazuki Takai
 
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築Kazuki Takai
 
Azure Arc Jumpstart Update - HCIBox Edition
Azure Arc Jumpstart Update - HCIBox EditionAzure Arc Jumpstart Update - HCIBox Edition
Azure Arc Jumpstart Update - HCIBox EditionKazuki Takai
 
ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報Kazuki Takai
 
Arc 対応サーバーへの SSH アクセス
Arc 対応サーバーへの SSH アクセスArc 対応サーバーへの SSH アクセス
Arc 対応サーバーへの SSH アクセスKazuki Takai
 
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...Kazuki Takai
 
Insight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeInsight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeKazuki Takai
 
最近の PowerShell について
最近の PowerShell について最近の PowerShell について
最近の PowerShell についてKazuki Takai
 
Windows Server 2022 Datacenter Azure Edition Overview
Windows Server 2022 Datacenter Azure Edition OverviewWindows Server 2022 Datacenter Azure Edition Overview
Windows Server 2022 Datacenter Azure Edition OverviewKazuki Takai
 
Recap: Windows Server 2019 Failover Clustering
Recap: Windows Server 2019 Failover ClusteringRecap: Windows Server 2019 Failover Clustering
Recap: Windows Server 2019 Failover ClusteringKazuki Takai
 
使ってみよう PowerShell
使ってみよう PowerShell使ってみよう PowerShell
使ってみよう PowerShellKazuki Takai
 
5分で分かる Windows Server 2019 HCI 超概要
5分で分かる Windows Server 2019 HCI 超概要5分で分かる Windows Server 2019 HCI 超概要
5分で分かる Windows Server 2019 HCI 超概要Kazuki Takai
 
Application Platform としての Windows Server 2019
Application Platform としての Windows Server 2019Application Platform としての Windows Server 2019
Application Platform としての Windows Server 2019Kazuki Takai
 
Windows Server 2019 で Container を使ってみる
Windows Server 2019 で Container を使ってみるWindows Server 2019 で Container を使ってみる
Windows Server 2019 で Container を使ってみるKazuki Takai
 
Windows とコンテナの話
Windows とコンテナの話Windows とコンテナの話
Windows とコンテナの話Kazuki Takai
 
Azure Stack の使い道 - 2017年11月版 -
Azure Stack の使い道 - 2017年11月版 -Azure Stack の使い道 - 2017年11月版 -
Azure Stack の使い道 - 2017年11月版 -Kazuki Takai
 
IT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングIT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングKazuki Takai
 

More from Kazuki Takai (18)

Azure Arc Automanage Machine Configuration による構成の管理と適用
Azure Arc Automanage Machine Configuration による構成の管理と適用Azure Arc Automanage Machine Configuration による構成の管理と適用
Azure Arc Automanage Machine Configuration による構成の管理と適用
 
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築
Azure Arc Jumpstart - Azure ArcBox を使った Azure Arc 対応 SQL MI 学習環境の構築
 
Azure Arc Jumpstart Update - HCIBox Edition
Azure Arc Jumpstart Update - HCIBox EditionAzure Arc Jumpstart Update - HCIBox Edition
Azure Arc Jumpstart Update - HCIBox Edition
 
ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報
 
Arc 対応サーバーへの SSH アクセス
Arc 対応サーバーへの SSH アクセスArc 対応サーバーへの SSH アクセス
Arc 対応サーバーへの SSH アクセス
 
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...
Insight into Azure Active Directory #02 - Azure AD B2B Collaboration New Feat...
 
Insight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeInsight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & Scope
 
最近の PowerShell について
最近の PowerShell について最近の PowerShell について
最近の PowerShell について
 
Windows Server 2022 Datacenter Azure Edition Overview
Windows Server 2022 Datacenter Azure Edition OverviewWindows Server 2022 Datacenter Azure Edition Overview
Windows Server 2022 Datacenter Azure Edition Overview
 
Azure Arc 概要
Azure Arc 概要Azure Arc 概要
Azure Arc 概要
 
Recap: Windows Server 2019 Failover Clustering
Recap: Windows Server 2019 Failover ClusteringRecap: Windows Server 2019 Failover Clustering
Recap: Windows Server 2019 Failover Clustering
 
使ってみよう PowerShell
使ってみよう PowerShell使ってみよう PowerShell
使ってみよう PowerShell
 
5分で分かる Windows Server 2019 HCI 超概要
5分で分かる Windows Server 2019 HCI 超概要5分で分かる Windows Server 2019 HCI 超概要
5分で分かる Windows Server 2019 HCI 超概要
 
Application Platform としての Windows Server 2019
Application Platform としての Windows Server 2019Application Platform としての Windows Server 2019
Application Platform としての Windows Server 2019
 
Windows Server 2019 で Container を使ってみる
Windows Server 2019 で Container を使ってみるWindows Server 2019 で Container を使ってみる
Windows Server 2019 で Container を使ってみる
 
Windows とコンテナの話
Windows とコンテナの話Windows とコンテナの話
Windows とコンテナの話
 
Azure Stack の使い道 - 2017年11月版 -
Azure Stack の使い道 - 2017年11月版 -Azure Stack の使い道 - 2017年11月版 -
Azure Stack の使い道 - 2017年11月版 -
 
IT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングIT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティング
 

PowerShell 5.0 で広がる運用管理の世界

  • 1. PowerShell 5.0 で広がる 運用管理の世界 Interact × Cloud Samurai Roadshow 2015 年 7月 (2015.07.11) Kazuki Takai – System Center User Group Japan
  • 2. 自己紹介  高井 一輝 (Takai Kazuki)  某ISP勤務  クラウドサービスの開発、設計、設備維持  Windows Server / System Center / Linux / etc…  System Center User Group Japan (SCUGJ)  Twitter : @zhuky7 / Facebook : kazuki.takai  Blog : http://operationslab.wordpress.com/ 2
  • 3. 本日の内容  本日の内容 (お話しすること)  PowerShell 5.0 / WMF 5.0 を中心とした運用管理系のテクノロジー、ソリューション  標準コマンドレットの拡充  構成管理 (Desired State Configuration)  パッケージ管理 (Package Manager)  セキュリティの強化 (Just Enough Administration、Just in Time Administration/PAM)  お話ししないこと  運用管理に直接関係ない PowerShell 5.0 の新機能  各機能の細かい仕様や設定方法 3
  • 5. はじめる前に  このセッションでは Preview 版の製品、テクノロジーについて記載しています  2015/07 時点の情報をベースにしています  今後のリリースで機能や動作が変更、削除される可能性があります  主に、Windows PowerShell 5.0 について記載します  厳密には、PowerShell 5.0 の新機能ではないものも含まれています  Windows Server 2016 の新機能に紐づく個々のコマンドレットについては (ほとんど) 記載しません 5
  • 6. 本日の環境  WMF 5.0 Preview  Windows 10 Pro Insider Preview (Build 10162, 10166)  Windows Server 2016 TP2 (Build 10072)  Package Repository, MIM  Windows Server 2012 R2  Windows 8.1 6
  • 7. Windows Server と PowerShell  Windows Server の進化とともに、PowerShell も進化  PowerShell 1.0 : Windows Server 2003, Windows XP, Vista の追加コンポーネント  PowerShell 2.0 : Windows Server 2008 R2 に標準搭載 (2003 – 2008 対応)  PowerShell 3.0 : Windows Server 2012 に標準搭載 (2008, 2008 R2 対応)  PowerShell 4.0 : Windows Server 2012 R2 に標準搭載 (2008 R2, 2012 対応)  PowerShell 5.0 : Windows Server 2016 に標準搭載予定 (2008 R2 – 2012 R2 対応?)  デフォルトで有効化  Windows 10 にも搭載予定!? 7
  • 8. 2012 R2 vs 2016 8  Windows Server 2012 R2  Build Version : 6.3.9600.16394  Windows Server 2012 R2 with KB3000850  Build Version : 6.3.9600.17400  Windows Server 2016 TP2  Build Version : 10.0.10074.0  Windows Server 2012 R2 with WMF 5.0 Preview  Build Version : 10.0.10105.0  Windows 10 Insider Preview  Build Version : 10.0.10162.0 (Slow Ring), 10.0.10166.0 (Fast Ring)
  • 9. WMF 5.0 Preview April 2015  2015/07/10 現在、以下の OS に対応  Windows Server 2012 R2, Windows 8.1  Windows Server 2012  Windows Server 2008 R2, Windows 7  KB3055381 or KB3055377 or KB2908075 をインストールすることで利用可能  OS 毎に指定の KB をインストール  詳細はリリースノートを参照  英語の言語パックがインストールされていない環境ではインストールに失敗する(かも) 9
  • 10. PowerShell 5.0 の新機能  PackageManagement を使用したソフトウェアのインストール  PowerShellGet を使用したモジュールの管理  クラスの定義  デバッグ関連の機能追加(拡充)  DSC 関連の機能追加  OData エンドポイントからコマンドレットを生成  監査/ロギング機能の強化  ネットワークスイッチ管理のためのコマンドレット追加  ZIP ファイルの操作  シンボリックリンク関連の機能強化  文字列から構造化オブジェクトを生成  etc... 10
  • 11. 本日紹介する機能  標準コマンドレットの拡充  PowerShell Direct  Remote Copy  etc...  構成管理  DSC (Windows/Linux)  パッケージ管理  Package Management  PowerShell Get  セキュリティの強化  Just Enough Administration  Just in Time Administration/PAM 11
  • 12. 標準コマンドレットの拡充  運用管理面で便利なコマンドレッド、スイッチの追加および機能の拡張  PowerShell Direct  Remote Copy  Transcript  Get-Clipboard, Set-Clipboard  Compress-Archive, Expand-Archive  -Recurse with -Depth  -NoNewLine  -ItemType SymbolicLink 12
  • 13. PowerShell Direct  Hyper-V ホストからゲスト VM に対してアクセス可能  ホストからゲストへの PSSession  Hyper-V ゲストサービス不要  PowerShell Remoting 構成不要  ネットワーク接続不要  Enter-PSSession / Invoke-Command  New-PSSession では使用できない (少なくとも Preview においては)  Copy-VMFile と組み合わせると、初期構成が可能 13
  • 14. PowerShell Direct  注意点  ホスト、ゲストともに Windows 10 or Windows Server 2016 である必要がある  評価上の注意点  ホストとゲストの組み合わせにより、うまく動作しない場合がある  Windows 10 Insider Preview Build 10162 -> Windows Server 2016 TP2 Build 10072 : NG  Windows 10 Insider Preview Build 10162 -> Windows 10 Insider Preview Build 10166 : OK  Windows Server 2016 TP2 Build 10072 -> Windows Server 2016 TP2 Build 10072 : OK  なるべく同じ Build Version を使用する 14
  • 15. Remote Copy  PSSession 経由でアイテムのコピーが可能  Session は事前に確立しておく必要あり (New-PSSession)  Copy-Item コマンドレットの追加パラメータを使用  -FromSession  -ToSession  SSH (SCP) のような使い方が可能に! 15
  • 16. 監査/ロギング機能の強化  Transcripting の改善  ファイル名自動生成機能 (保存先フォルダーのみ指定)  コマンド実行時刻の自動記録が可能  外部コマンドの出力を記録可能  Script Block のロギング  全てのスクリプトブロックをイベントログへ記録  Microsoft-Windows-PowerShell/Operational  グループポリシーで有効化  Administrative Templates -> Windows Components -> Windows PowerShell 16 ※ BuildVersion 6.3.9600.17400 以降で利用可能
  • 17. Script Block のロギング 17 ※ BuildVersion 6.3.9600.17400 以降で利用可能
  • 18. Demo New & Update Cmdlets 18  PowerShell Direct  Remote Copy  Transcript
  • 19. Desired State Configuration (DSC)  Windows PowerShell Desired State Configuration  サーバーの構成と管理を行うための機能  操作 (構築) 手順ではなく、状態を記述することでサーバーを自動構成  DSC によるサーバーの構成手順  PowerShell で構成後のサーバーの状態を定義  PowerShell コードから構成データが含まれる MOF ファイルを生成  MOF ファイルを使用してサーバーを構成 19
  • 20. DSC 関連の機能追加  複数コンピューター間でのリソース依存関係の記述 (Wait for All/Any)  DSC リソース実行時のアカウント指定 (Run as Credential)  Linux サーバへの適用 (DSC for Linux)  64bit 環境における 32bit プロセス環境 (WOW64) の構成をサポート  Configuration Status の集中管理 (情報の集約/レポーティング)  PowerShell ISE の DSC 編集サポートの強化  DSC Local Configuration Manager 向けの Meta-Configuration Attribute  DSC Configuration の分割記述  ConfigurationRepositoryWeb 経由で外部の記述をインポート 20
  • 21. DSC 関連の機能追加  追加のリソース  PowerShell Gallery (など) からダウンロード  PowerShellGet を使用してインストール  (または) モジュールフォルダーに手動で展開  PowerShell DSC for Linux  http://www.microsoft.com/en-us/download/details.aspx?id=46919  ダウンロードファイル (パッケージ) 内に、以下が含まれる  Windows Server (PowerShell) 上で利用可能な Linux 向けの DSC リソース (nx)  Linux 用の DSC パッケージ 21
  • 22. Demo  Local Configuration (User)  Wait for & Run as Credential  DSC for Linux Desired State Configuration 22
  • 23. PackageManager  リポジトリベースのパッケージ管理システム  コアシステム  管理用のコマンドレット  PowerShell 上から操作・管理可能  *-Package コマンドレット群  リポジトリの追加が可能  *-PackageProvider 23
  • 24. うまく動かないときは  NuGet プロバイダが登録されているか確認する  初めて Find-Package, Install-Package, Find-Module, Install-Module などを 実行した際に、NuGet プロバイダ用のファイルをインストールするか確認される  NuGet プロバイダが追加されていない場合は、以下コマンドレットが必要  Get-PackageProvider –Name NuGet –ForceBootstrap  追加プロバイダーの保存先  管理者として実行した場合 : $env:PROGRAMFILES¥OneGet¥ProviderAssemblies  それ以外の場合 : $env:LOCALAPPDATA¥OneGet¥ProviderAssemblies 24
  • 26. PowerShellGet  PowerShell のモジュールや DSC リソースを管理するための仕組み  リポジトリからモジュールやリソースをダウンロードしてインストール  *-Module / *-DscResource コマンドレット群  リポジトリの追加や変更が可能  Register-PSRepository / Unregister-PSRepository  Get-PSRepogitory / Set-PSRepogitory 26
  • 27. ローカルリポジトリ  内部の (管理された) リポジトリを使用可能  パッケージをホスト (ダウンロード) 可能なサーバー  パッケージ情報をフィードする仕組み  上記 2 点を満たすサーバーであれば、リポジトリとして利用可能  お手軽に試す場合は…  NuGet.Server などを利用可能 27
  • 28. Demo Package & Module Management 28  Package Management  PowerShellGet  Local Repository
  • 29. セキュリティ  JEA (Just Enough Administration)  実行可能な操作やアクセス可能なオブジェクトを制限  Just-in-Time Admin Access  MIM (Microsoft Identity Manager) と連携して、必要なときのみ権限を付与  Privileged groups / TTL  ロギング・監査機能の強化  前述 29
  • 30. Just Enough Administration  利用可能なコマンドレットを制限する仕組み  事前に、専用のエンドポイントを作成  エンドポイントに対して、利用可能なコマンドレットやパラメータを設定  作業時は、エンドポイントに接続して操作  New-PSSession などのコマンドレットで、-ConfigurationName を指定  エンドポイント環境内では、事前の構成に従って、実行可能なコマンドレットや 指定可能なパラメータが制限される  構成には DSC の xJEA リソースを使用 (すると、簡単に設定可能) 30
  • 31. JIT Admin (PAM) 31  Just-In-Time Administration  必要な時だけ、期限を区切って特権を取得することで、よりセキュアに  ワークフローへの組み込みなども可能  Active Directory Domain Service と Microsoft Identity Manager を使用  普段利用しているドメインアカウントからは権限を削除  リクエストに応じて、MIM が動的に権限を付与 (セキュリティグループへ追加)  あらかじめ設定された、またはリクエストされた TTL を経過すると、 Kerberos チケットが失効  特権取得のリクエストに PowerShell を使用可能
  • 32. Demo Security 32  Just Enough Administration  JIT Admin
  • 33. まとめ  PowerShell 5.0 は着実に進化  DSCの利用範囲/適用範囲が拡大  ソフトウェア/モジュールのインストール簡易化  セキュリティの強化  まずは利用してみる! 33
  • 34. 参考資料  What‘s New in Windows PowerShell – TechNet  http://technet.microsoft.com/en-us/library/hh857339.aspx  Windows PowerShell Blog  http://blogs.msdn.com/b/powershell/  PowerShell Gallery  https://www.powershellgallery.com/ 34