Windows Registry

Adding Keys and Values

C:\>reg add [\\TargetIPaddr\][RegDomain]\[Key]

Add a key to the registry on machine [TargetIPaddr] within the registry domain [RegDomain] to location [Key].

If no remote machine is specified, the current machine is assumed.

Export and Import

C:\>reg export [RegDomain]\[Key] [FileName]

Export all subkeys and values located in the domain [RegDomain] under the location [Key] to the file [FileName]

C:\>reg import [FileName]

Import all registry entries from the file [FileName].

Import and export can only be done from or to the local machine.

Query for a specific Value of a Key

C:\>reg query [\\TargetIPaddr\][RegDomain]\[Key] /v [ValueName]

Query a key on machine [TargetIPaddr] within the registry domain [RegDomain] in location [Key] and get the specific value **[ValueName]**under that key.

Add /s to recurse all values.

WMIC

Fundamental grammar

C:\>wmic [alias] [where clause] [verb clause]

Useful [aliases]: