1. 1
IT Pro のためのスクリプト講座
Windows PowerShell を使おう!
日本マイクロソフト株式会社
エバンジェリスト
安納 順一 Junichi Anno
http://blogs.technet.com/junichia/
Facebook: junichi anno
~ 基礎からサーバー管理の自動化まで
V2.0
2012.5.12 Fukuoka 版
5. 5
DevOps(=Development and Operations)
開発サイドと運用サイドの協調により、
Development ~ Delivery 全体のアジリティを高めるためのプロセス
Developer Operator
DevOps
(参考)
・Velocity 2009 : “10+ Deploys Per Day: Dev and Ops Cooperation at Flickr” by John Allspaw
・DevOps って何? by 宮下 さん http://www.slideshare.net/mizzy/devops-4156440
協調文化を確立し
”IT”によりビジネスを進化させる
ビジネスに合わせた
アプリケーションの
進化
ビジネスに合わせた
インフラの進化
6. 6
マイクロソフトの DevOps シナリオ
開発担当 運用担当
• Visual Studio 2011
• IntelliTrace Agent
• System Center 2012
• ConfigMgr 構成パック
• OpsMgr 管理パック
• OpsMgr AVICode
• Orchestrator(Opalis)
• SM インシデント管理
• VMM Portal など
• Windows PowerShell
• SQL Server bacpac
・
・
8. 8
業務アプリケーション
Dev にとっての PowerShell ①
サービス
開発担当
運用担当PowerShell
標準コマンドレット
開発
利用
アドバイス
利用
Windows Server OS
Active Directory
SharePoint Server
Exchange Server
・
・
9. 9
PowerShell スクリプト
Dev にとっての PowerShell ②
サービス
開発担当
運用担当サービス専用
コマンドレット開発
作成
処理の自動化
製品のメンテナンス
障害の調査
実
行
フィードバック
利用
10. 10
マイクロソフト製品と PowerShell の関係
• 製品ごとに専用の”コマンドレット”が用意されている
• 多くの管理 GUI は裏でコマンドレットを呼んでいる
• インフラ担当者に、各製品への”標準化されたアクセス方法”を提供する
Active Directory
Active Directory
PowerShell コマンドレット
Active Directory
管理センター
Hyper-V
VMM
PowerShell コマンドレット
System Center
Virtual Machine Manager
PowerShell
コンソール
11. 11
Windows Management Framework
PowerShell が Management Hub となる
IT Pro
IT
Developer
Solution
Developer
Storage Exchange DevicesDisk YOUR ELEMENTS
Windows PowerShell
CIMOM、SMI-S
標準化されたアクセス
標準化されたプロトコル
標準化されたモデル
WS-Man(Web Service for Management) 他のプラッ
トフォーム
Service
Provider
開
発
NanoWBEM
Pegasus
13. 13
Windows
.NET Framework
PowerShell スクリプト
exe
bat VBScript JScript
Script Engine
CLR(共通言語ランタイム)
Class Library
スクリプトの実行環境
PowerShell エンジン
COM
cmd/
command
Windows Script Host
Cscript.exe Wscript.exe
C
O
M