en-US/PSWinPrefs.dll-help.xml

<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml">
  <command:command
    xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
    xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"
    xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
  >
    <command:details>
      <command:name>Save-Preferences</command:name>
      <maml:description>
        <maml:para>Save registry content as reg commands to an output directory.</maml:para>
      </maml:description>
      <command:verb>Save</command:verb>
      <command:noun>Preferences</command:noun>
    </command:details>
    <maml:description>
      <maml:para
      >This will save all reg commands generated by Write-RegCommands and place them in a directory. It can also commit and push the changes automatically.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Save-Preferences</maml:name>
        <command:parameter position="named" required="false">
          <maml:name>DeployKey</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>Format</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>MaxDepth</maml:name>
          <command:parameterValue required="true">Int32</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>OutputDirectory</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>OutputFile</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>Path</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>Commit</maml:name>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter position="named" required="false">
        <maml:name>Commit</maml:name>
        <maml:description>
          <maml:para>If set, commits to Git repository at output directory.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>DeployKey</maml:name>
        <maml:description>
          <maml:para>Key for pushing to Git repository. Requires -Commit.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>Output format. Acceptable values: c, c#, ps, ps1, powershell.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>MaxDepth</maml:name>
        <maml:description>
          <maml:para>Depth limit.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>OutputDirectory</maml:name>
        <maml:description>
          <maml:para>Where to store the exported data.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>OutputFile</maml:name>
        <maml:description>
          <maml:para
          >Output file. If not set, a file with the prefix exec-reg will be made with an appropriate extension.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>Registry path.</maml:para>
        </maml:description>
      </command:parameter>
    </command:parameters>
  </command:command>
  <command:command
    xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
    xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"
    xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
  >
    <command:details>
      <command:name>Write-RegCommands</command:name>
      <maml:description>
        <maml:para
        >Convert a registry path to a series of reg commands for copying into a script.</maml:para>
      </maml:description>
      <command:verb>Write</command:verb>
      <command:noun>RegCommands</command:noun>
    </command:details>
    <maml:description>
      <maml:para
      >By default only HKCU: and HKLM: are mounted in PowerShell. Others need to be mounted and must be under the appropriate name such as HKU for HKEY_USERS.

  Keys are skipped under these conditions:

  - Depth limit (20); this can be changed by passing -MaxDepth or -m
  - Key that cannot be read for any reason such as permissions.
  - Value contains newlines

  An example of an always skipped key under normal circumstances is HKLM\SECURITY, even if this is run as administrator.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Write-RegCommands</maml:name>
        <command:parameter position="named" required="true">
          <maml:name>Path</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>Format</maml:name>
          <command:parameterValue required="true">String</command:parameterValue>
        </command:parameter>
        <command:parameter position="named" required="false">
          <maml:name>MaxDepth</maml:name>
          <command:parameterValue required="true">Int32</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter position="named" required="false">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>Output format. Acceptable values: c, c#, ps, ps1, powershell.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="false">
        <maml:name>MaxDepth</maml:name>
        <maml:description>
          <maml:para>Depth limit.</maml:para>
        </maml:description>
      </command:parameter>
      <command:parameter position="named" required="true">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>Registry path.</maml:para>
        </maml:description>
      </command:parameter>
    </command:parameters>
    <maml:alertSet>
      <maml:alert>
        <maml:para
        >WARNING: If you save an entire tree such as HKLM to a file and attempt to run said script, you probably will break your OS. The output of this tool is meant for getting a single command at time, testing it, and then using it in an appropriate script. The author will not be held responsible for any damages.</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>PS&gt; Write-RegCommands &apos;HKCU:\Control Panel\Desktop&apos;</dev:code>
      </command:example>
    </command:examples>
  </command:command>
</helpItems>