課程大綱 Windows PowerShell 簡介 Windows PowerShell 的優點 Windows PowerShell 的架構 使用 Windows PowerShell Cmdlets Windows PowerShell Provider 使用 PowerShell Script 使用 WMI 使用 Active Directory 使用檔案系統 使用 Registry 管理 Exchange 2007 - -
3.
Windows PowerShell 簡介 Windows PowerShell 是微軟新創的命令列「殼層」和 script 語言 script 語言 特性 簡單、易學、易用 語法和結構通常比較簡單 開發者可快速完成程式編寫工作 直譯式的執行方式 , 不需編譯 - -
4.
Windows PowerShell 的優點 以 .NET 技術為基礎,並且與現有的 WSH 保持回溯相容 可存取 .NET CLR ,也可使用現有的 COM 技術 提供超過 130 種的命令列工具 ( 稱為 "cmdlet") ,用來執行一般系統管理工作 管理服務、處理序、事件記錄檔、憑證、登錄,以及使用 WMI 等 支援現有的指令碼語言和現有的命令列工具,以及多個 Windows 版本 Windows XP 、 Windows Server 2003 、 Windows Vista 以及 Windows Server 2008 - -
5.
Windows PowerShell 的優點 ( 續 ) 在命令列剖析複雜的運算式及操作 .NET Framework 物件 包括以管道輸送物件,協助 IT 專業人員更有效率的工作 管理不同存放區和不同格式的 Windows 資料 ADSI 、 WMI 、 COM 物件、 ADO 、 HTML 和 XML 的標準公用程式 可擴充的介面,讓獨立軟體廠商和企業開發人員建立自訂的 cmdlet ,符合應用程式和系統管理的獨特需求。 - -
下載 PowerShellWindows Server 2008 是第一個內建 Windows PowerShell 的 Windows 系統 預設並未安裝 Windows 其他系統亦可下載安裝 Windows Vista x86 http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=c6ef4735-c7de-46a2-997a-ea58fdfcba63 Windows Vista x64 http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=af37d87d-5de6-4af1-80f4-740f625cd084 Windows XP Service Pack 2 x86 http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=30125a46-b97c-4704-aa10-605e809d5933 Windows Server 2003 Service Pack 1 x86 http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=c61fb27b-e71c-4ecf-9d2c-9b299b149490 - -
8.
安裝 PowerShell執行 PowerShell 需要 Microsoft .NET v2.0.50727 版以上的環境 Windows Vista 、 Windows Server 2008 已內建符合要求 .NET 執行環境 Windows Server 2003 SP1 或 Windows XP SP2 就需要自行下載安裝 .NET 執行環境 Microsoft .NET 2.0 http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5 Microsoft .NET 3.0 http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=zh-tw 安裝後,可以在『開始』功能表看到『 Windows PowerShell 』資料夾,裡面有執行 MSH 的捷徑。只要執行 MSH 的捷徑,就可以開啟 MSH 的執行環境。 - -
Community Resources NewsgroupMicrosoft.Public.Windows.PowerShell Channel 9 tag http://channel9.msdn.com/tags/Monad Team blog http://blogs.msdn.com/PowerShell/ Wiki http://channel9.msdn.com/wiki/default.aspx/Channel9.WindowsPowerShellWiki Script Center www.microsoft.com/technet/scriptcenter/hubs/msh.mspx Lots of community blogs (e.g.) www.leeholmes.com/blog www.thepowershellguy.com Windows PowerShell Analyzer tool www.karlprosser.com/coder/?cat=8
25.
For More InformationVisit TechNet at: www.microsoft.com/technet Windows PowerShell: www.microsoft.com/powershell www.microsoft.com/windowsserver/longhorn/powershell.mspx Books: Windows PowerShell in Action by Bruce Payette (Manning Publications, 2007) http://manning.com/powershell/ Microsoft Windows PowerShell: TFM by Don Jones and Jeffery Hicks (SAPIEN Press, 2007) www.sapienpress.com/ Windows PowerShell Step by Step by Ed Wilson (Microsoft Press ® , 2007) www.microsoft.com/MSPress/books/10329.aspx Monad (AKA PowerShell): Introducing the MSH Command Shell and Language by Andy Oakley (O'Reilly Media, Inc., 2005) www.oreilly.com/catalog/msh/