大网数据广告活动
Windows排障命令

logman update cfg

· 52CE 我爱测

Reference article for the logman update cfg command, which updates the properties of an existing configuration data collector.

Updates the properties of an existing configuration data collector.

Syntax

logman update cfg <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Performs the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-[-]u <user [password]> Specifies the user to Run As. Entering a * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
-m <[start] [stop] [[start] [stop] [...]]> Changes to manual start or stop instead of a scheduled begin or end time.
-rf <[[hh:]mm:]ss> Runs the data collector for the specified period of time.
-b `<M/d/yyyy h:mm:ss[AM PM]>`
-e `<M/d/yyyy h:mm:ss[AM PM]>`
-si <[[hh:]mm:]ss> Specifies the sample interval for performance counter data collectors.
-o `<path dsn!log>`
-[-]r Repeats the data collector daily at the specified begin and end times.
-[-]a Appends an existing log file.
-[-]ow Overwrites an existing log file.
-[-]v `<nnnnnn mmddhhmm>`
-[-]rc <task> Runs the command specified each time the log is closed.
-[-]max <value> Maximum log file size in MB or maximum number of records for SQL logs.
-[-]cnf <[[hh:]mm:]ss> When time is specified, creates a new file when the specified time has elapsed. When time is not specified, creates a new file when the maximum size is exceeded.
-y Answers yes to all questions without prompting.
-[-]ni Enables (-ni) or disable (-ni) network interface query.
-reg <path [path [...]]> Specifies registry value(s) to collect.
-mgt <query [query [...]]> Specifies WMI object(s) to collect using SQL query language.
-ftc <path [path [...]]> Specifies the full path to the file(s) to collect.
/? Displays context-sensitive help.
Remarks
  • Where [-] is listed, adding an extra hyphen (-) negates the option.

Examples

To update a configuration data collector called cfg_log, to collect the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentverion\, type:

logman update cfg cfg_log -reg HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentverion\

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/16/2017
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。