Windows Admin Scripting Little Black Book- P20

Windows Admin Scripting Little Black Book- P20:This book may not be duplicated in any way without the express written consent of the publisher, except in the form of brief excerpts or quotations for the purposes of review. The information contained herein is for the personal use of the reader and may not be incorporated in any commercial programs, other books, databases, or any kind of software without written consent of the publisher. Making copies of this book or any portion for any purpose other than your own is a violation of United States copyright laws | 3. Select Start Run and enter kix32 scriptfile . Here scriptfile is the full path of the new directory from step 1 and file name of a script file that contains the following RCODE BackUpEventLog Security C If @ERROR 0 or RCODE 0 Error backing up log End If Clearing the Event Log ClearEventLog is a KiXtart command that allows you to clear the contents of an event log. The basic syntax for using the ClearEventLog command is as follows ClearEventLog logtype Tip You can clear the event log of a remote computer by including the UNC path before the log type for example ClearEventLog computer Security Here logtype is the type of log to clear Application System or Security . To clear the event log using KiXtart proceed as follows 1. Create a new directory to store all files included in this example. 2. Download and extract the latest version of KiXtart from to the new directory. 3. Select Start Run and enter kix32 scriptfile . Here scriptfile is the full path of the new directory from step 1 and file name of a script file that contains the following RCODE ClearEventLog Security If @ERROR 0 or RCODE 0 Error clearing the event log End If Using Logs with Windows Script Host Windows Script Host allows you to write events to a text log and the event log using simple script files. This allows you to store critical events in the event log while storing less severe events to a text log. Note Windows Script Host does not contain any methods to read or modify events in the event log. Writing to Text Logs Text logs provide an easy way to record events and share the file with others regardless of operating system. To log an event to a text log using Windows Script Host proceed as follows 1. Create a new directory to store all files included in this example. 2. Download and install the latest version of Windows Script Host from to the new directory. 3. Select Start Run and enter cscript . Here scriptfile is the full path and

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.