Sunday, April 19, 2009

Commands and tools for managing Windows 2008 Server Core

Commands and tools for managing Windows Server 2008 Server Core
บทความโดย: Thai Windows Administrator Blog

เนื่องจาก Windows Server 2008 Server Core นั้นจะมีระบบการจัดการแบบยูสเซอร์อินเทอร์เฟช (User Interface: UI) ให้ใช้งานอย่างจำกัดเฉพาะที่จำเป็น ตัวอย่าง เช่น ยูสเซอร์อินเทอร์เฟช เช่น
• Windows Logon screen สำหรับใช้ในการ Log on และ Log off
• Notepad สำหรับใช้ในการแก้ไขไฟล์เอกสาร
• Regedit สำหรับใช้ในการจัดการ Registry
• Task Manager สำหรับใช้ในการ Tasks และเริ่มต้น Tasks ใหม่
• Command Prompt สำหรับใช้ในการจัดการระบบผ่านทาง Command line

ดังนั้น การจัดการ Windows Server 2008 Server Core ในด้านต่างๆ จะต้องทำโดยใช้คำสั่งแบบ Command line บทความนี้จะรวบรวมคำสั่งต่างๆ ที่แอดมินต้องทราบในการจัดการ Windows Server 2008 Server Core

การจัดการ Windows Server 2008 Server Core
หลังทำการ Log on เข้า Server Core เรียบร้อยแล้ว แอดมินจะได้รับสภาพแวดล้อมของการทำงานแบบเดสก์ท็อปที่จำกัด พร้อมคอมมานด์พร้อมท์ สำหรับใช้ทำการรันคำสั่งต่างๆ

Windows Server 2008 Core Installation Command Prompt
รูปที่ 1 Windows Server 2008 Core Installation Command Prompt

วิธีเปิดหน้าต่างคอมมานด์พร้อมท์
ถ้าแอดมินเผลอทำการปิดหน้าต่างคอมมานด์พร้อมท์ สามารถทำการเปิดได้ใหม่ได้ตามขั้นตอนดังนี้
1. เปิดหน้าต่าง Task Manager โดยการกดปุ่ม Ctrl+Shift+Esc พร้อมกัน
2. บนแท็บ Applications คลิก New Task
3. ในไดอะล็อกบ็อกซ์ Create New Task พิมพ์ cmd ในช่อง Open เสร็จแล้วคลิก OK

• วิธีเปิดโปรแกรม Notepad ทำได้โดยการพิมพ์ notepad.exe ที่คอมมานด์พร้อมท์แล้วกด Enter
• วิธีเปิดโปรแกรม Registry Editor ทำได้โดยการพิมพ์ regedit.exe ที่คอมมานด์พร้อมท์แล้วกด Enter
• วิธีเปิดหน้าต่าง Control Panel ทำได้โดยการพิมพ์ intl.cpl ที่คอมมานด์พร้อมท์แล้วกด Enter

Commands and Tools
คำสั่งแบบโลคอลสำหรับใช้จัดการ Windows Server 2008 Core Installation มีดังนี้

Control desk.cpl - View or set display settings.

Control intl.cpl - View or set regional and language options, including formats and the keyboard layout.

Control sysdm.cpl - View or set system properties.

Control timedate.cpl - View or set the date, time, and time zone.

Cscript slmgr.vbs –ato - Activate the operating system.

DiskRaid.exe - Configure software RAID.

ipconfig /all - List information about the computer’s IP address configuration.

NetDom RenameComputer - Set the server’s name and domain membership.

OCList.exe - List roles, role services, and features.

OCSetup.exe - Add or remove roles, role services, and features.

PNPUtil.exe - Install or update hardware device drivers.

Sc query type=driver - List installed device drivers.

Scregedit.wsf - Configure the operating system. Use the /cli parameter to list available configuration areas.

ServerWerOptin.exe - Configure Windows Error Reporting.

SystemInfo - List the system configuration details.

WEVUtil.exe - View and search event logs.

Wmic datafile where name=“FullFilePath” get version - List a file’s version.

Wmic nicconfig index=9 call enabledhcp - Set the computer to use dynamic IP addressing rather than static IP addressing.

Wmic nicconfig index=9 call enablestatic(“IPAddress”), (“SubnetMask”) - Set a computer’s static IP address and network mask.

Wmic nicconfig index=9 call setgateways(“GatewayIPAddress”) - Set or change the default gateway.

Wmic product get name /value “ - List installed MSI applications by name.

Wmic product where name=“Name” call uninstall - Uninstall an MSI application.

Wmic qfe list - List installed updates and hotfixes.

Wusa.exe PatchName.msu /quiet - Apply an update or hotfix to the operating system.

แหล่งข้อมูลอ้างอิง
• http://technet.microsoft.com/en-us/magazine/dd630943.aspx

© 2009 TWAB. All Rights Reserved.

0 Comment: