顯示包含「windows server 2008 r2」標籤的文章。顯示所有文章
顯示包含「windows server 2008 r2」標籤的文章。顯示所有文章

2010年10月1日星期五

Print Management in Windows Server 2008 R2

測試環境
1. AD: Windows Server 2003 R2 x64
2. Print Server: Windows Server 2008 R2
3. Client: Windows 7 x64 & Windows XP x86
4. Printer: 分別在兩層樓不同位置 (29/F, 30/F)

設定
1. 首先在AD 和Print Server 安裝Print Management


2.在AD, 打開Active Directory Users and Computers, 因為Printer 分開兩層, 而每部電腦都應該只會連線所屬層數的Printer, 如29/F 電腦只會Print 在29/F 的Printer, 所以要新增兩個OU, 29/F Computers & 30/F Computers, 把適當的電腦放在這兩個OU.


3.分別在兩個OU, 新增一個GPO, 因為Print Management 是靠GPO 而部署Printer 到不同的電腦


4. 由於有Client 電腦是用Windows XP x86, 而Windows XP 是靠Pushprinterconnections.exe 來連接Printer, 而AD 是x64, 不適合用在x86 環境上.所以要找一個x86 版本的Pushprinterconnections.exe
可以在這裡下載pmcmgmt.exe
http://www.microsoft.com/downloads/en/details.aspx?familyid=9bfb44f5-232a-4fb5-bc14-45bfd81b7ac1&displaylang=en
安裝後會在C:\Windows\pmcsnap 找到pushprinterconnections.exe, 把這個檔案放到剛剛新增的GPO內


5. AD 預備之後, 到Windows Server 08 R2 Print Management, 新增所需要的Printer

6.而每部Printer 都要Sharing 和List in Directory, 另外因為有x86 Client, 所以要加入x86 Driver

7. Printer 設定完成後, 可以根據不同GPO deploy 到不同Client 電腦


8.打開AD 內Print Management, 在Deployed Printer, 會發現剛剛Deploy 的Printers

9. 最後User 登入到電腦, 便會發現Printer 已經連接好.

2010年6月15日星期二

利用Windows AIK 加入新Driver

前天買了新的AMD 六核電腦,當安裝Windows Server 08 R2 時候發現沒有DVD-Rom, 怎麼辦?立即想起利用另一部08 Server 的Windows Development Service (WDS) 經Network 部署08 R2, 但由於新電腦主機板的網絡晶片比較新, 08R2 影像檔沒有此Driver, 所以不能直接使用WDS, 事先要利用Windows AIK 加入Driver 到影像檔

準備事項
a. Windows Automated Installation Kit for Windows 7
b. Windows Server 08 R2 Installation Image
c. NIC Driver for Windows Server 2008 (xx.inf)

1. 安裝Windows AIK 並打開Deployment Tools Command Prompt (Run As Administrator)
輸入 "dism /get-wiminfo /wimfile:f:\Images\boot.wim" 找到Windows Setup X64 是index 2


2. Unmount Windows Setup X64 出來
"dism /mount-wim /wimfile:f:\boot.wim /index:2 /mountdir:f:\mountboot"


3. 現在可以加入Driver
"dism /image:f:\mountboot /add-driver /driver:f:\lan\netrtx64.inf"


4. 儲存並封裝Boot.Wim
"dism /unmount-wim /mountdir:f:\mountboot /commit"


5. 然後可以把新的boot.wim 新增到WDS, 這時新的電腦可以利用WDS 部署OS

2010年2月3日星期三

Windows Server 2008 R2 – 如何利用Windows Deployment Service 大量部署Windows XP SP3 到Client Computers 並自動加入網域 (Join Domain)

上次提及如何利用WDS + VHD 部署Windows 7 到Client Computers, 今次講述如何抓取(Capture) Windows XP SP3 做Reference Image (.wim 檔案)
*VHD 只支持Windows 7 和Windows Server 2008 R2*
部署環境
WDS + DHCP + AD: Windows Server 2008 R2
Reference Image: Windows XP SP3 + Application + Sysprep Tool
A.新增Capture Boot Image 來抓取 Reference Image
準備一部Reference 電腦, 安裝完Windows 和 所有Applications並執行sysprep tool 來準備capture image. (Sysprep Tool 在Windows XP SP3 安裝碟內\tools\deploy.cab)

B. 打開WDS 控制台, 在已加入了Boot Image 按滑鼠右鍵, 選擇”Create Capture Boot Image”, 按指示選好儲存位置和更改名稱, 如: Microsoft Windows Capture Setup (x86) 及在Install Images 建立Image Group “WinXP”


C.開啟Reference Computer 並選擇Boot from Network, 會出現開機選單, 選擇Windows Capture Setup (x86) 開機, 等一會便出現以下畫面


D. 向下箭咀選取”C:\” (一定要執行了sysprep, 才可以選取) 為Image 檔改名和Description


E. 上載到WDS Server 上




F. 在C:\RemoteInstall\Images\winxp\winxp建立$OEM$\$1\sysprep 資料夾, 建立sysprep.inf 並儲存這個資料夾下(因為Windows XP 不支援unattended.xml 做answer file)


2010年2月2日星期二

Windows Server 2008 R2 - 利用Windows Development Service 把VHD 大量Deploy 到Client PC

之前提及過VHD 是Windows 7 & Windows Server 2008 R2 重要新增支持, 今次教如何經Windows Deployment Service把reference VHD 部署到Client PC.
好處:
1. 用統一的Image 套用到實體和虛擬電腦上, 方便管理
2. 只要用一set 工具便可實現
3. 快速部署新電腦
今次所需環境
WDS + AD + DHCP Server: Windows Server 2008R2
Windows Automated Installation Kit
Sysprep Tool

1. 預備Reference VHD
首先, 用Microsoft Virtual PC/Hyper-V 安裝OS, Application, 及設定所需設定, 之後用Sysprep封存, Sysprep主要功能在於「封存」到沒有SID的狀態, 主要是用來防止用戶在多台電腦安裝同一個Windows令出現網絡識別問題, 另外如果已經有實體電腦, 可以利用Disk2VHD Tool 轉成VHD 做可. 但都一定要執行Sysprep.
Sysprep 位置: C:\Windows\System32\sysprep
選取 OOBE, Generalize, Shutdown, 當執行完成便會自動關機, 之後便用這個reference vhd 來部署Client PC.

2. 安裝和設定Windows Deployment Service
Windows Deployment Service 要在AD 環境內實現, 在”Add Role” 選取”Windows Deployment Service” 和”DHCP” 服務, 然後”Next”

A. 在”Role Service” 選取”Deployment Server” 和”Transport Server”, 按”Next”


B.在設定DHCP 版面”Specify IPv4 DNS Setting” 輸入”Parent Domain”, “DNS Server IPv4 Address” 按”Next”



C. 在”Add or Edit DHCP Scopes” 新增DHCP IP 範圍, 按”Next”


D. 在”Configure DHCPv6 Stateless Mode” 選取”Disable DHCPv6 stateless mode for this server”
之後按”Next” 再按”Install” 等待安裝完成.


E. 打開”Windows Deployment Services”,按”Add Server” 新增server


F. 在DHCP Tab, 因為DHCP 和WDS Service 都是同一部機上, 所以要選取兩個options


G.在PXE Response Tab, 因為稍後在AD DS上會預先設定client computers, 所以WDS Server只會response to KNOW client computers


H. 在Boot Tab, 可以設定client computer boot from PXE 時需不需要按F12 才可以繼續, 而Default boot image, 可以預設會用哪個boot image 來開機, 稍後會用command 分別為不同client computers 來套用不同boot image.


3. 新增boot & install images

A. 新增Boot Image, 可在Windows 7 或Windows Server 2008 R2 安裝碟內找到\source\boot.wim


B.在Install Images Folder 新增Image Group “win7”


C. 安裝WAIK, 並用Administrator 執行Deployment Tools Command Prompt.


D. 把已封存的VHD 新增到WDS 內, 因為在WDS MMC 不能直接新增VHD 檔案, 所以要用command 來實現
Wdsutil.exe /verbose /progress /add-image /imagefile:”c:\win7.vhd” /imagetype:install /imagegroup:”win7”


E.新增成功便可在WDS 控制台發現已加入的image


F. 開啟Windows System Image Manager,建立兩個files, unattended file 是~來回應Windows Deployment Service, answer file是回應安裝windows 7.
建立一個unattended file 叫”unattend7” 並儲存在”C:\RemoteInstall\WdsClientUnattend”



G. 建立一個answer file 叫”WdsUnattendTemplate”, 並儲存在任何地方


H. 回到WDS控制台, 展開”Install Images”滑鼠右鍵指向Image, 按”Properties” , 選取”Allow Image to install in unattended mode” , 選取剛剛建立的answer file




4. 預先設定client computers, 並設定Client Computer使用指定的Boot Image, Install Image.
A. 在DC 上開啟Active Directory Users and Computers, 新增”Computer” 在computer’s unique ID: 輸入client computer GUID: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} 或MAC address: 0000000000000000mac address (在mac address 前要加入20個0), 設定WDS Server Name


在Deployment Tools Command Prompt, 設定computer 其他資料, 如要套用哪個unattend.xml, pxeboot.com, boot image, Join Domain 權限
Wdsutil .exe /set-device /device:wdsxp01 /ID:{xxxxxxx} /ReferralServer:wdsserver.lab.com /Bootprogram:boot/x86/pxeboot.com /wdsclientunattend:WDSClientUnattend\unattend7.xml /User:lab\administrator /JoinRights:Full /bootimagepath:boot\x86\images\boot.wim



查詢Client 設定資料
Wdsutil.exe /get-device /device:name


5. 開始Deploy Client Computer
啟動Client Computer 並按”F12”選擇從Boot From Network, 之後做會完全自動化直到整個Windows 7安裝完成.