目前分類:PowerShell (163)
- May 19 Sat 2007 16:41
PowerShell:查詢某日PowerShell的EventLog
- May 12 Sat 2007 04:24
PowerShell:一本免費的PowerShell電子書
- May 07 Mon 2007 02:31
PowerShell:Accessing Database And Displaying Images Using Windows PowerShell
Accessing Database And Displaying Images Using Windows PowerShell
1)把dataTable存成文字檔,可用以下指令
$ds.Tables[0] > c:\Categories.txt
但是欄位資料會被切斷
- May 07 Mon 2007 01:45
PowerShell:Hosting PowerShell in ASP.NET
- May 06 Sun 2007 10:39
PowerShell:修改AD使用者之可登入電腦(Windows server 2003)
假設要限制AD使用者只能登入網域中的某些電腦
可以使用以下的PowerShell指令
$user = [ADSI]"CN=username,OU=hisOUname,DC=abc,DC=com" #某使用者的完整路徑
$user.userWorkstations="computer1,computer2,computer3" #指定允許登入的電腦名稱字串
- May 06 Sun 2007 09:28
PowerShell:去除字串中多餘的空白
假設有一個字串
"PowerShell is fun!"
我們想要去除字與字之間的多餘空白
使字與字之間僅有一個空白
即"PowerShell is fun!"
- Apr 27 Fri 2007 19:23
PowerShell:Rule-Based Sorting
在我的論文中,訂單執行的排序是使用Rule-Based Sorting
意即先依據某屬性遞增或遞減排列,
若該屬性有一樣的值,則使用其他指定屬性遞增或遞減排序
直到排完全部的訂單
- Apr 05 Thu 2007 06:56
PowerShell:Hey Scripting Guy!專欄開始有PowerShell的解法
http://www.microsoft.com/technet/scriptcenter/resources/qanda/all.mspx
該專欄以往都只有VB script的解法
這幾天的專欄結尾已經有PowerShell的解法囉:P
- Apr 05 Thu 2007 06:15
PowerShell:PowerShell+Microsoft Workflow Foundations=FullArmor Workflow Studio
http://www.fullarmor.com/knowledge-fullarmor-labs.htm
FullArmor Workflow Studio是結合PowerShell以及Microsoft Workflow Foundations這兩項微軟最新技術的產品
該產品可藉由簡單的拖拉來設定workflow
以完成複雜的系統管理工作
- Apr 02 Mon 2007 01:57
PowerShell:LiteralPath
假設今天有一個檔案
檔名為[2].txt
若要開啟該檔案
則使用
- Apr 01 Sun 2007 20:41
PowerShell:讀取鍵盤輸入
(1)
若要偵測使用者按的按鍵為何
可以使用以下程式片段
$key = $host.ui.RawUI.ReadKey("NoEcho,IncludeKeyUp")
$key則會存取所按的按鍵為何
- Apr 01 Sun 2007 19:51
PowerShell:使用Shell.Application開啟檔案
#使用shell.application開啟檔案
$shell = New-Object -com shell.application
#取出d:\test0401之下一層的資料及資料夾
$foldersandFiles = $shell.NameSpace("d:\test0401")
#列舉每筆資料,記得要.items()
- Apr 01 Sun 2007 18:01
PowerShell:PrintScreen
#若要用PowerShell達到PrintScreen的功能,可執行底下程式
[reflection.assembly]::LoadWithPartialName("System.Drawing") > $null
$Bitmap = new-object System.Drawing.Bitmap 1280,800 #依照螢幕解析度
$Size = New-object System.Drawing.Size 1280,800 #依照螢幕解析度
$FromImage = [System.Drawing.Graphics]::FromImage($Bitmap)
- Mar 31 Sat 2007 05:50
PowerShell:PowerShell to Ship in Windows Server (Longhorn)
http://blogs.msdn.com/powershell/archive/2007/03/28/announced-powershell-to-ship-in-windows-server-longhorn.aspx
微軟在聖地牙哥所招開的微軟管理高峰會(Microsoft Management Summit)
中宣布Windows PowerShell 將出現在Longhorn beta3版中:)
- Mar 19 Mon 2007 00:11
PowerShell:取得IP與MAC對應資料
gwmi -computer 127.0.0.1 -Query "select * from Win32_NetworkAdapterConfiguration where IPEnabled = 1" |
select Caption,macaddress,ipaddress | format-list
- Mar 18 Sun 2007 22:27
PowerShell:New-object -com 常用COM物件
- WScript.Shell
- WScript.Network
- Shell.Application
- InternetExplorer.Application
- MSScriptControl.ScriptControl
- Mar 15 Thu 2007 03:57
[引用]Getting Started with PowerShell
- Mar 12 Mon 2007 00:38
PowerShell:列出Enum
System.DayOfWeek是Enum
[System.DayOfWeek]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True DayOfWeek System.Enum
- Mar 11 Sun 2007 23:50
PowerShell:談論主題 Data Access