狠狠撸

狠狠撸Share a Scribd company logo
Windows PowerShell  呂政周 精誠恆逸教育訓練處 資深講師 http://edu.uuu.com.tw - -
課程大綱 Windows PowerShell  簡介 Windows PowerShell  的優點 Windows PowerShell  的架構 使用 Windows PowerShell Cmdlets Windows PowerShell Provider 使用  PowerShell Script 使用  WMI 使用  Active Directory 使用檔案系統 使用  Registry 管理  Exchange 2007 - -
Windows PowerShell  簡介 Windows PowerShell  是微軟新創的命令列「殼層」和  script  語言 script  語言 特性 簡單、易學、易用 語法和結構通常比較簡單 開發者可快速完成程式編寫工作 直譯式的執行方式 ,  不需編譯 - -
Windows PowerShell  的優點 以  .NET  技術為基礎,並且與現有的  WSH  保持回溯相容 可存取  .NET CLR ,也可使用現有的  COM  技術  提供超過  130  種的命令列工具  ( 稱為  "cmdlet") ,用來執行一般系統管理工作 管理服務、處理序、事件記錄檔、憑證、登錄,以及使用 WMI  等 支援現有的指令碼語言和現有的命令列工具,以及多個  Windows  版本 Windows XP 、 Windows Server 2003 、 Windows Vista  以及  Windows Server 2008 - -
Windows PowerShell  的優點  ( 續 ) 在命令列剖析複雜的運算式及操作  .NET Framework  物件 包括以管道輸送物件,協助  IT  專業人員更有效率的工作 管理不同存放區和不同格式的  Windows  資料 ADSI 、 WMI 、 COM  物件、 ADO 、 HTML  和  XML  的標準公用程式 可擴充的介面,讓獨立軟體廠商和企業開發人員建立自訂的  cmdlet ,符合應用程式和系統管理的獨特需求。 - -
Windows PowerShell Overview Command-Line Interface Exchange Snap-In Task Automation Bulk Operations Extends Console
下載  PowerShell Windows 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 - -
安裝  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 的執行環境。 - -
使用 PowerShell - - PowerShell  的第一次接觸
- - Windows PowerShell  可以視為  Cmd  命令提示字元的延伸,許多  Cmd  或指令都可以繼續在  Windows PowerShell  執行,而且大部分的命令列工具程式也都能繼續在  Windows PowerShell  使用 ; 例如  cd/chdir 、 dir 、 cls 、 ls 、   ipconfig 或是 ServerManagerCmd … 等 . Windows PowerShell  不分字母大小寫,因此  dir  和  Dir  都會視為相同的指令。
Cmdlet  Windows PowerShell  雖然內建了若干指令,但重要及有用的功能是來自於外加的工具程式。例如 Cmd  雖然內建了若干指令 ( 例如  dir 、 cls  等 ) ,但如果無法執行外加的工具程式 ( 例如  IPConfig 、 Net 、 NetSH 、 ServerManagerCmd  等等 ) , Cmd  就失去價值及擴充的能力了。 Windows PowerShell  也是如此。  Windows PowerShell  有自己的工具程式規格,而  Windows PowerShell  的工具程式稱為  cmdlet 。 - -
Cmdlet  特性 名稱是由兩個部分所組成,並以橫線連結這兩個部分: 前為動作 、 後為動作的標的 例如  Get - Help   能取得線上說明 Get - Process   能取得行程資訊 PowerShell 1.0  提供了  129  個  cmdlet 提供了一個可列出所有  cmdlet  的  cmdlet Get-Command 這個  cmdlet  會列出所有  cmdlet  的指令類型 ( 都是  Cmdlet) 、名稱,以及節錄的語法說明 . - -
Get-Help 如果想要知道某個  cmdlet  的使用說明,利用  Get-Help cmdlet  或以下  3  種方法,都可以達到相同的目的 Get-Help <cmdlet  名稱 > Help <cmdlet  名稱 > <cmdlet  名稱 > -? - -
Get-Help ( 續 ) Get-Help ( 或  Help)  還可以透過萬用字元列出相關主題 Get-Help *   -> 列出所有說明主題 Get-Help set-*   -> 列出所有  set-  開頭的主題 Get-Help *object*  -> 列出所有名稱裡有  object  的主題 Get-Help about*  -> 列出所有概念主題 Get-Help about_redirection  -> 列出『重新導向』概 念主題的說明內容 - -
Get-Help ( 續 ) 有些主題或  cmdlet  還可以利用  Get-Help/Help  的  -detailed  或  -full  參數,列出包含範例的詳細或所有說明,而  -examples  參數則可以列出範例;例如: Get-Help Get-Help -detailed -> 列出  Get-Help  的詳細說明 Help dir -full -> 列出  dir  的完整說明 Help dir -examples -> 僅列出  dir  的範例 - -
指令的參數與用法 除了  cmdlet , Windows PowerShell  的指令還包括 別名 、 函式 、 程式 、 script  檔案 輸入指令的同時,有時候必須輸入適當的參數。不同類型的指令,其參數的格式亦略有差異。 對  Cmdlet  及別名來說,有些參數包含成對的參數名稱及參數值,有些參數則只有參數名稱或參數值,而參數名稱是以短橫線作為前置符號;例如以下的  -name dir  就是成對的參數名稱 (-name) 和參數值 (dir) , -examples  則沒有參數值: Get-Help -name dir -examples - -
指令的參數與用法  ( 續 ) 指令的參數分成必要參數和可以省略的選用參數兩類,查詢指令用法的說明會以一對半形的方括號括住選用參數,必要參數則不會有符號括住;以方括號括住表示可以省略。例如  Get-Help  的用法 : Get-Help [[-name] <string>] [-component <string[]>]  [-functionality <string[]>]  [-role <string[]>]  [-category <string[]>] [-examples]  [<CommonParameters>] 查詢指令的用法時,經常會看到以上用法說明,其中: - -
指令的參數與用法  ( 續 ) 指令的參數分成必要參數和可以省略的選用參數兩類,查詢指令用法的說明會以一對半形的方括號括住選用參數,必要參數則不會有符號括住;以方括號括住表示可以省略。例如  Get-Help  的用法 : Get-Help [[-name] <string>] [-component <string[]>]  [-functionality <string[]>]  [-role <string[]>]  [-category <string[]>] [-examples]  [<CommonParameters>] - -
指令的參數與用法  ( 續 ) 查詢指令的用法時,經常會看到以上用法說明,其中: 一共有  7  個選用參數,並沒有必要參數。  前  5  個參數包含了成對的參數名稱和參數值。  前  5  個參數包含了成對的參數名稱和參數值。  [<CommonParameters>]  參數只有參數值;這個參數意指每個  cmdlet  都支援的共同參數。  第  1  個參數的參數名稱也以方括號括住,表示這個參數名稱可以省略,所以我們可以只輸入  Get-Help dir 。  ? 第  1  個參數的參數值是  <string> ,表示這個參數值為字串;以角括號括住,表示必須輸入適當的參數值,而不是輸入  string 。  - -
指令的參數與用法  ( 續 ) 以實例來說明參數名稱的簡略輸入法則,例如以下的指令: Get-Help -name dir –examples 上述指令經過  cmdlet  的參數名稱簡略輸入法則可以變成: Get-Help -n dir –ex 或 Get-Help -nam dir -exa - -
Object Pipelines in Action gps|where{$_.handles -gt 500}|sort handles|ft name,handles gps (Get-Process) Operating system platform Windows PowerShell engine where (Where-Object) sort (Sort-Object) ft (Format-Table) (Out-Host) gps | where{$_.handles -gt 500} | sort handles | ft name,handles
演練 - -
结论
Community Resources Newsgroup Microsoft.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
For More Information Visit 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/
- - ? 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related Content

Similar to 0220 Windows server 2008 PowerShell (20)

Asp.net mvc 培训
Asp.net mvc 培训Asp.net mvc 培训
Asp.net mvc 培训
lotusprince
?
厂别濒别苍颈耻尘介绍
厂别濒别苍颈耻尘介绍厂别濒别苍颈耻尘介绍
厂别濒别苍颈耻尘介绍
lory hou
?
ASP.NET MVC Code Templates實戰開發 -twMVC#4
 ASP.NET MVC Code Templates實戰開發 -twMVC#4 ASP.NET MVC Code Templates實戰開發 -twMVC#4
ASP.NET MVC Code Templates實戰開發 -twMVC#4
twMVC
?
twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC#04 | ASP.NET MVC - Code Templates實戰開發twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC
?
Struts Mitac(1)
Struts Mitac(1)Struts Mitac(1)
Struts Mitac(1)
wangjiaz
?
【 I Love Joomla 】- Joomla!佈景製作教學
【 I Love Joomla 】- Joomla!佈景製作教學【 I Love Joomla 】- Joomla!佈景製作教學
【 I Love Joomla 】- Joomla!佈景製作教學
ilovejoomla
?
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
feng wan
?
Introduction to MVC of CodeIgniter 2.1.x
Introduction to MVC of CodeIgniter 2.1.xIntroduction to MVC of CodeIgniter 2.1.x
Introduction to MVC of CodeIgniter 2.1.x
Bo-Yi Wu
?
笔贬笔通用程序的模板运行机制
笔贬笔通用程序的模板运行机制笔贬笔通用程序的模板运行机制
笔贬笔通用程序的模板运行机制
horseluke
?
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 ServletServlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Justin Lin
?
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
Wade Huang
?
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
xuebao_zx
?
厂迟谤耻迟蝉快速学习指南
厂迟谤耻迟蝉快速学习指南厂迟谤耻迟蝉快速学习指南
厂迟谤耻迟蝉快速学习指南
yiditushe
?
在云端上啜饮爪哇
在云端上啜饮爪哇在云端上啜饮爪哇
在云端上啜饮爪哇
建興 王
?
0118 Windows Server 2008 的伺服器核心 (Server Core)
0118 Windows Server 2008 的伺服器核心 (Server Core)0118 Windows Server 2008 的伺服器核心 (Server Core)
0118 Windows Server 2008 的伺服器核心 (Server Core)
Timothy Chen
?
系統程式 -- 第 1 章 系統軟體
系統程式 -- 第 1 章 系統軟體系統程式 -- 第 1 章 系統軟體
系統程式 -- 第 1 章 系統軟體
鍾誠 陳鍾誠
?
I Love Joomla! 佈景製作教學 0212
I Love Joomla! 佈景製作教學 0212I Love Joomla! 佈景製作教學 0212
I Love Joomla! 佈景製作教學 0212
Asika Simon
?
P6 服务器安装与配置
P6 服务器安装与配置P6 服务器安装与配置
P6 服务器安装与配置
epst
?
Free Marker中文文档
Free Marker中文文档Free Marker中文文档
Free Marker中文文档
yiditushe
?
厂别濒别苍颈耻尘介绍
厂别濒别苍颈耻尘介绍厂别濒别苍颈耻尘介绍
厂别濒别苍颈耻尘介绍
lory hou
?
ASP.NET MVC Code Templates實戰開發 -twMVC#4
 ASP.NET MVC Code Templates實戰開發 -twMVC#4 ASP.NET MVC Code Templates實戰開發 -twMVC#4
ASP.NET MVC Code Templates實戰開發 -twMVC#4
twMVC
?
twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC#04 | ASP.NET MVC - Code Templates實戰開發twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC#04 | ASP.NET MVC - Code Templates實戰開發
twMVC
?
Struts Mitac(1)
Struts Mitac(1)Struts Mitac(1)
Struts Mitac(1)
wangjiaz
?
【 I Love Joomla 】- Joomla!佈景製作教學
【 I Love Joomla 】- Joomla!佈景製作教學【 I Love Joomla 】- Joomla!佈景製作教學
【 I Love Joomla 】- Joomla!佈景製作教學
ilovejoomla
?
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
张挺接口性能测试入门培训(闯尘别迟别谤+顿测苍补迟谤补肠别)(适合初学者).辫辫迟虫
feng wan
?
Introduction to MVC of CodeIgniter 2.1.x
Introduction to MVC of CodeIgniter 2.1.xIntroduction to MVC of CodeIgniter 2.1.x
Introduction to MVC of CodeIgniter 2.1.x
Bo-Yi Wu
?
笔贬笔通用程序的模板运行机制
笔贬笔通用程序的模板运行机制笔贬笔通用程序的模板运行机制
笔贬笔通用程序的模板运行机制
horseluke
?
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 ServletServlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Servlet & JSP 教學手冊第二版試讀 - 撰寫與設定 Servlet
Justin Lin
?
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
Wade Huang
?
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
翱谤补濒颈耻虫+尘测蝉辩濒5单机多实例安装文档
xuebao_zx
?
厂迟谤耻迟蝉快速学习指南
厂迟谤耻迟蝉快速学习指南厂迟谤耻迟蝉快速学习指南
厂迟谤耻迟蝉快速学习指南
yiditushe
?
在云端上啜饮爪哇
在云端上啜饮爪哇在云端上啜饮爪哇
在云端上啜饮爪哇
建興 王
?
0118 Windows Server 2008 的伺服器核心 (Server Core)
0118 Windows Server 2008 的伺服器核心 (Server Core)0118 Windows Server 2008 的伺服器核心 (Server Core)
0118 Windows Server 2008 的伺服器核心 (Server Core)
Timothy Chen
?
系統程式 -- 第 1 章 系統軟體
系統程式 -- 第 1 章 系統軟體系統程式 -- 第 1 章 系統軟體
系統程式 -- 第 1 章 系統軟體
鍾誠 陳鍾誠
?
I Love Joomla! 佈景製作教學 0212
I Love Joomla! 佈景製作教學 0212I Love Joomla! 佈景製作教學 0212
I Love Joomla! 佈景製作教學 0212
Asika Simon
?
P6 服务器安装与配置
P6 服务器安装与配置P6 服务器安装与配置
P6 服务器安装与配置
epst
?
Free Marker中文文档
Free Marker中文文档Free Marker中文文档
Free Marker中文文档
yiditushe
?

More from Timothy Chen (20)

Google Q3 2008 Quarterly Earnings Summary
Google Q3 2008 Quarterly Earnings SummaryGoogle Q3 2008 Quarterly Earnings Summary
Google Q3 2008 Quarterly Earnings Summary
Timothy Chen
?
Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案
Timothy Chen
?
Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案
Timothy Chen
?
0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制
Timothy Chen
?
0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制
Timothy Chen
?
0513 深入Windows Server 2008 系統核心
0513 深入Windows Server 2008  系統核心0513 深入Windows Server 2008  系統核心
0513 深入Windows Server 2008 系統核心
Timothy Chen
?
0509 Windows Serevr 2008 新世代網路應用程式
0509 Windows Serevr 2008 新世代網路應用程式0509 Windows Serevr 2008 新世代網路應用程式
0509 Windows Serevr 2008 新世代網路應用程式
Timothy Chen
?
0506 Windows Server 2008 終端機服務
0506 Windows Server 2008 終端機服務0506 Windows Server 2008 終端機服務
0506 Windows Server 2008 終端機服務
Timothy Chen
?
0505 Windows Server 2008 一日精華營 Part II
0505 Windows Server 2008 一日精華營 Part II0505 Windows Server 2008 一日精華營 Part II
0505 Windows Server 2008 一日精華營 Part II
Timothy Chen
?
0505 Windows Server 2008 一日精華營 PartI
0505 Windows Server 2008 一日精華營 PartI0505 Windows Server 2008 一日精華營 PartI
0505 Windows Server 2008 一日精華營 PartI
Timothy Chen
?
0502 Windwos Server 2008 Card Space 新一代身份驗證機制
0502 Windwos Server 2008 Card Space 新一代身份驗證機制0502 Windwos Server 2008 Card Space 新一代身份驗證機制
0502 Windwos Server 2008 Card Space 新一代身份驗證機制
Timothy Chen
?
1204 Windows Server 2008 檔案儲存與分行管理技術
1204 Windows Server 2008 檔案儲存與分行管理技術1204 Windows Server 2008 檔案儲存與分行管理技術
1204 Windows Server 2008 檔案儲存與分行管理技術
Timothy Chen
?
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
Timothy Chen
?
0416 Windows Server 2008 Native IPv6 新功能介紹
0416 Windows Server 2008 Native IPv6 新功能介紹0416 Windows Server 2008 Native IPv6 新功能介紹
0416 Windows Server 2008 Native IPv6 新功能介紹
Timothy Chen
?
0328 Windows Server 2008 應用程式相容性
0328 Windows Server 2008 應用程式相容性0328 Windows Server 2008 應用程式相容性
0328 Windows Server 2008 應用程式相容性
Timothy Chen
?
1130 Windows server 2008 - IIS 7.0 伺服器效能管理
1130 Windows server 2008 - IIS 7.0 伺服器效能管理1130 Windows server 2008 - IIS 7.0 伺服器效能管理
1130 Windows server 2008 - IIS 7.0 伺服器效能管理
Timothy Chen
?
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
Timothy Chen
?
Tech Net Taiwan Resources Intro
Tech Net Taiwan Resources IntroTech Net Taiwan Resources Intro
Tech Net Taiwan Resources Intro
Timothy Chen
?
0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討
Timothy Chen
?
1026 Windows Server 2008 Active Directory 版權管理服務
1026 Windows Server 2008 Active Directory 版權管理服務1026 Windows Server 2008 Active Directory 版權管理服務
1026 Windows Server 2008 Active Directory 版權管理服務
Timothy Chen
?
Google Q3 2008 Quarterly Earnings Summary
Google Q3 2008 Quarterly Earnings SummaryGoogle Q3 2008 Quarterly Earnings Summary
Google Q3 2008 Quarterly Earnings Summary
Timothy Chen
?
Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案
Timothy Chen
?
Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案Windows Server 2008 伺服器虛擬化解決方案
Windows Server 2008 伺服器虛擬化解決方案
Timothy Chen
?
0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制
Timothy Chen
?
0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制0514 Windows Server 2008 事件管理機制
0514 Windows Server 2008 事件管理機制
Timothy Chen
?
0513 深入Windows Server 2008 系統核心
0513 深入Windows Server 2008  系統核心0513 深入Windows Server 2008  系統核心
0513 深入Windows Server 2008 系統核心
Timothy Chen
?
0509 Windows Serevr 2008 新世代網路應用程式
0509 Windows Serevr 2008 新世代網路應用程式0509 Windows Serevr 2008 新世代網路應用程式
0509 Windows Serevr 2008 新世代網路應用程式
Timothy Chen
?
0506 Windows Server 2008 終端機服務
0506 Windows Server 2008 終端機服務0506 Windows Server 2008 終端機服務
0506 Windows Server 2008 終端機服務
Timothy Chen
?
0505 Windows Server 2008 一日精華營 Part II
0505 Windows Server 2008 一日精華營 Part II0505 Windows Server 2008 一日精華營 Part II
0505 Windows Server 2008 一日精華營 Part II
Timothy Chen
?
0505 Windows Server 2008 一日精華營 PartI
0505 Windows Server 2008 一日精華營 PartI0505 Windows Server 2008 一日精華營 PartI
0505 Windows Server 2008 一日精華營 PartI
Timothy Chen
?
0502 Windwos Server 2008 Card Space 新一代身份驗證機制
0502 Windwos Server 2008 Card Space 新一代身份驗證機制0502 Windwos Server 2008 Card Space 新一代身份驗證機制
0502 Windwos Server 2008 Card Space 新一代身份驗證機制
Timothy Chen
?
1204 Windows Server 2008 檔案儲存與分行管理技術
1204 Windows Server 2008 檔案儲存與分行管理技術1204 Windows Server 2008 檔案儲存與分行管理技術
1204 Windows Server 2008 檔案儲存與分行管理技術
Timothy Chen
?
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
0425 Windows Server 2008 與 WSS下之表單工作與工作流程的整合
Timothy Chen
?
0416 Windows Server 2008 Native IPv6 新功能介紹
0416 Windows Server 2008 Native IPv6 新功能介紹0416 Windows Server 2008 Native IPv6 新功能介紹
0416 Windows Server 2008 Native IPv6 新功能介紹
Timothy Chen
?
0328 Windows Server 2008 應用程式相容性
0328 Windows Server 2008 應用程式相容性0328 Windows Server 2008 應用程式相容性
0328 Windows Server 2008 應用程式相容性
Timothy Chen
?
1130 Windows server 2008 - IIS 7.0 伺服器效能管理
1130 Windows server 2008 - IIS 7.0 伺服器效能管理1130 Windows server 2008 - IIS 7.0 伺服器效能管理
1130 Windows server 2008 - IIS 7.0 伺服器效能管理
Timothy Chen
?
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
1116 Windows server 2008 - 使用 IIS 7.0 建置安全站台
Timothy Chen
?
Tech Net Taiwan Resources Intro
Tech Net Taiwan Resources IntroTech Net Taiwan Resources Intro
Tech Net Taiwan Resources Intro
Timothy Chen
?
0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討
Timothy Chen
?
1026 Windows Server 2008 Active Directory 版權管理服務
1026 Windows Server 2008 Active Directory 版權管理服務1026 Windows Server 2008 Active Directory 版權管理服務
1026 Windows Server 2008 Active Directory 版權管理服務
Timothy Chen
?

Recently uploaded (10)

麦考瑞大学毕业证成绩单
麦考瑞大学毕业证成绩单麦考瑞大学毕业证成绩单
麦考瑞大学毕业证成绩单
xnuasa
?
伍伦贡大学毕业证成绩单
伍伦贡大学毕业证成绩单伍伦贡大学毕业证成绩单
伍伦贡大学毕业证成绩单
xnuasa
?
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
oybyk
?
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
oybyk
?
弗林德斯大学本科学位证成绩单
弗林德斯大学本科学位证成绩单弗林德斯大学本科学位证成绩单
弗林德斯大学本科学位证成绩单
xnuasa
?
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
xnuasa
?
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
xnuasa
?
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
株式会社厂补濒别蝉丑耻产
?
西澳大学硕士学位证成绩单
西澳大学硕士学位证成绩单西澳大学硕士学位证成绩单
西澳大学硕士学位证成绩单
xnuasa
?
西悉尼大学毕业证假文凭
西悉尼大学毕业证假文凭西悉尼大学毕业证假文凭
西悉尼大学毕业证假文凭
xnuasa
?
麦考瑞大学毕业证成绩单
麦考瑞大学毕业证成绩单麦考瑞大学毕业证成绩单
麦考瑞大学毕业证成绩单
xnuasa
?
伍伦贡大学毕业证成绩单
伍伦贡大学毕业证成绩单伍伦贡大学毕业证成绩单
伍伦贡大学毕业证成绩单
xnuasa
?
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
一比一原版(美国金门大学毕业证书)骋骋鲍毕业证文凭如何办理
oybyk
?
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
一比一原版(奥塔哥大学毕业证书)翱迟补驳辞毕业证文凭如何办理
oybyk
?
弗林德斯大学本科学位证成绩单
弗林德斯大学本科学位证成绩单弗林德斯大学本科学位证成绩单
弗林德斯大学本科学位证成绩单
xnuasa
?
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
一比一原版(伦敦大学国王学院毕业证书)碍颈苍驳&#虫27;蝉毕业证文凭如何办理
xnuasa
?
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
一比一原版(拉夫堡大学毕业证书)尝鲍毕业证文凭如何办理
xnuasa
?
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料公司様向けこ?提案资料
株式会社厂补濒别蝉丑耻产
?
西澳大学硕士学位证成绩单
西澳大学硕士学位证成绩单西澳大学硕士学位证成绩单
西澳大学硕士学位证成绩单
xnuasa
?
西悉尼大学毕业证假文凭
西悉尼大学毕业证假文凭西悉尼大学毕业证假文凭
西悉尼大学毕业证假文凭
xnuasa
?

0220 Windows server 2008 PowerShell

  • 1. Windows PowerShell 呂政周 精誠恆逸教育訓練處 資深講師 http://edu.uuu.com.tw - -
  • 2. 課程大綱 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 種的命令列工具 ( 稱為 &quot;cmdlet&quot;) ,用來執行一般系統管理工作 管理服務、處理序、事件記錄檔、憑證、登錄,以及使用 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 ,符合應用程式和系統管理的獨特需求。 - -
  • 6. Windows PowerShell Overview Command-Line Interface Exchange Snap-In Task Automation Bulk Operations Extends Console
  • 7. 下載 PowerShell Windows 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 的執行環境。 - -
  • 9. 使用 PowerShell - - PowerShell 的第一次接觸
  • 10. - - Windows PowerShell 可以視為 Cmd 命令提示字元的延伸,許多 Cmd 或指令都可以繼續在 Windows PowerShell 執行,而且大部分的命令列工具程式也都能繼續在 Windows PowerShell 使用 ; 例如 cd/chdir 、 dir 、 cls 、 ls 、 ipconfig 或是 ServerManagerCmd … 等 . Windows PowerShell 不分字母大小寫,因此 dir 和 Dir 都會視為相同的指令。
  • 11. Cmdlet Windows PowerShell 雖然內建了若干指令,但重要及有用的功能是來自於外加的工具程式。例如 Cmd 雖然內建了若干指令 ( 例如 dir 、 cls 等 ) ,但如果無法執行外加的工具程式 ( 例如 IPConfig 、 Net 、 NetSH 、 ServerManagerCmd 等等 ) , Cmd 就失去價值及擴充的能力了。 Windows PowerShell 也是如此。 Windows PowerShell 有自己的工具程式規格,而 Windows PowerShell 的工具程式稱為 cmdlet 。 - -
  • 12. Cmdlet 特性 名稱是由兩個部分所組成,並以橫線連結這兩個部分: 前為動作 、 後為動作的標的 例如 Get - Help 能取得線上說明 Get - Process 能取得行程資訊 PowerShell 1.0 提供了 129 個 cmdlet 提供了一個可列出所有 cmdlet 的 cmdlet Get-Command 這個 cmdlet 會列出所有 cmdlet 的指令類型 ( 都是 Cmdlet) 、名稱,以及節錄的語法說明 . - -
  • 13. Get-Help 如果想要知道某個 cmdlet 的使用說明,利用 Get-Help cmdlet 或以下 3 種方法,都可以達到相同的目的 Get-Help <cmdlet 名稱 > Help <cmdlet 名稱 > <cmdlet 名稱 > -? - -
  • 14. Get-Help ( 續 ) Get-Help ( 或 Help) 還可以透過萬用字元列出相關主題 Get-Help * -> 列出所有說明主題 Get-Help set-* -> 列出所有 set- 開頭的主題 Get-Help *object* -> 列出所有名稱裡有 object 的主題 Get-Help about* -> 列出所有概念主題 Get-Help about_redirection -> 列出『重新導向』概 念主題的說明內容 - -
  • 15. Get-Help ( 續 ) 有些主題或 cmdlet 還可以利用 Get-Help/Help 的 -detailed 或 -full 參數,列出包含範例的詳細或所有說明,而 -examples 參數則可以列出範例;例如: Get-Help Get-Help -detailed -> 列出 Get-Help 的詳細說明 Help dir -full -> 列出 dir 的完整說明 Help dir -examples -> 僅列出 dir 的範例 - -
  • 16. 指令的參數與用法 除了 cmdlet , Windows PowerShell 的指令還包括 別名 、 函式 、 程式 、 script 檔案 輸入指令的同時,有時候必須輸入適當的參數。不同類型的指令,其參數的格式亦略有差異。 對 Cmdlet 及別名來說,有些參數包含成對的參數名稱及參數值,有些參數則只有參數名稱或參數值,而參數名稱是以短橫線作為前置符號;例如以下的 -name dir 就是成對的參數名稱 (-name) 和參數值 (dir) , -examples 則沒有參數值: Get-Help -name dir -examples - -
  • 17. 指令的參數與用法 ( 續 ) 指令的參數分成必要參數和可以省略的選用參數兩類,查詢指令用法的說明會以一對半形的方括號括住選用參數,必要參數則不會有符號括住;以方括號括住表示可以省略。例如 Get-Help 的用法 : Get-Help [[-name] <string>] [-component <string[]>] [-functionality <string[]>] [-role <string[]>] [-category <string[]>] [-examples] [<CommonParameters>] 查詢指令的用法時,經常會看到以上用法說明,其中: - -
  • 18. 指令的參數與用法 ( 續 ) 指令的參數分成必要參數和可以省略的選用參數兩類,查詢指令用法的說明會以一對半形的方括號括住選用參數,必要參數則不會有符號括住;以方括號括住表示可以省略。例如 Get-Help 的用法 : Get-Help [[-name] <string>] [-component <string[]>] [-functionality <string[]>] [-role <string[]>] [-category <string[]>] [-examples] [<CommonParameters>] - -
  • 19. 指令的參數與用法 ( 續 ) 查詢指令的用法時,經常會看到以上用法說明,其中: 一共有 7 個選用參數,並沒有必要參數。 前 5 個參數包含了成對的參數名稱和參數值。 前 5 個參數包含了成對的參數名稱和參數值。 [<CommonParameters>] 參數只有參數值;這個參數意指每個 cmdlet 都支援的共同參數。 第 1 個參數的參數名稱也以方括號括住,表示這個參數名稱可以省略,所以我們可以只輸入 Get-Help dir 。 ? 第 1 個參數的參數值是 <string> ,表示這個參數值為字串;以角括號括住,表示必須輸入適當的參數值,而不是輸入 string 。 - -
  • 20. 指令的參數與用法 ( 續 ) 以實例來說明參數名稱的簡略輸入法則,例如以下的指令: Get-Help -name dir –examples 上述指令經過 cmdlet 的參數名稱簡略輸入法則可以變成: Get-Help -n dir –ex 或 Get-Help -nam dir -exa - -
  • 21. Object Pipelines in Action gps|where{$_.handles -gt 500}|sort handles|ft name,handles gps (Get-Process) Operating system platform Windows PowerShell engine where (Where-Object) sort (Sort-Object) ft (Format-Table) (Out-Host) gps | where{$_.handles -gt 500} | sort handles | ft name,handles
  • 24. Community Resources Newsgroup Microsoft.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 Information Visit 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/
  • 26. - - ? 2007 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.