TAILIEUCHUNG - Configuring Windows 7 (Training Kit) - Part 73

Configuring Windows 7 (Training Kit) - Part 73. This training kit is designed for IT professionals who operate in enterprise enviroments that use Windows 7 as a desktop operating system. You should have at least one year of experience in the IT field, as well as experience implementing and administering any Windows client operating system in a networked environment. | When you write scripts that interact with WMI-managed resources the term instance is used to refer to the managed resource in the script. For example the following script returns the drive letter for each logical disk drive on your computer strComputer . Set objSWbemServices GetObject winmgmts strComputer Set colSWbemObjectSet Win32_LogicalDisk For Each objSWbemObject In colSWbemObjectSet Next You can prompt for input in a WMI script and store this in a variable. For example the following partial script prompts the user for a password and stores it in the string variable strPassword which could for example be used with the function to connect to a server on the network strComputer . Please enter the administrator password strPassword The next script is a more complete routine that you can adapt for your own purposes. It uses the inputbox function to prompt for a computer name and then uses the MsgBox function to display information about that computer s printers processes and processor. The code is not significantly more complex than the previous examples you are simply displaying the values of object attributes but using the built-in functions gives the script a professional feel computer inputbox What computer do you want to check Press Enter if this computer Computer set WMI GetObject WinMgmts computer If computer then computer this computer List Set objs Win32_Printer For each obj in objs List List Next List Left List Len List -2 MsgBox List 64 Printers on computer List Set objs Win32_Process For each obj in objs List List Next List Left List Len List -2 MsgBox List 64 Processes on computer Lesson 2 Configuring Performance Settings CHAPTER 13 693 List set objs Win32_Processor For each obj in objs List List Next List Left List Len List -2 MsgBox .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.