System command

logman import and logman export command

This guide gathers the Microsoft Learn syntax and parameter reference for logman import and logman export, a Windows command or tool subcommand. Availability can depend on Windows version, role, optional feature and execution context.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

logman import [-n] <name> -xml <name> [options]
logman export [-n] <name> -xml <name> [options]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

logman import perf_log -s server_1 -xml C:\Windows\perf_log.xml

Parameters, options and clauses

Option / clauseDescription
import / exportImport a Data Collector Set from XML or export one to XML.
[-n] <name>Identify the target Data Collector Set by name.
-xml <name>Specify the XML file to read or write.
-s <computer name>Run against the specified remote computer.
-config <value>Load command options from a settings file.
-etsSend commands directly to Event Trace Sessions without saving or scheduling.
-u <user [password]> / -yChoose a Run As identity, or answer yes to confirmation prompts.
/?Display context-sensitive help.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory