en-GB/Get-DataverseRecordsFolder.psm1-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-DataverseRecordsFolder</command:name>
      <command:verb>Get</command:verb>
      <command:noun>DataverseRecordsFolder</command:noun>
      <maml:description>
        <maml:para>Reads a folder of JSON files written out by `Set-DataverseRecordFolder` and converts back into a stream of PS objects. Together these commands can be used to extract and import data to and from files, for instance for inclusion in source control, or build/deployment assets.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This helper cmdlet reads JSON files from a folder (typically created by Set-DataverseRecordsFolder) and emits them as PowerShell objects to the pipeline.</maml:para>
      <maml:para>Each JSON file in the folder is deserialized into a PowerShell object. This is useful for: - Reading data from source control</maml:para>
      <maml:para>- Importing data during build/deployment</maml:para>
      <maml:para>- Testing scenarios</maml:para>
      <maml:para></maml:para>
      <maml:para>When used with the `-deletions` switch, it reads from the 'deletions' subfolder instead, which contains records that were present in a previous export but are no longer present.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-DataverseRecordsFolder</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>InputPath</maml:name>
          <maml:description>
            <maml:para>Path to folder to read JSON files from.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>deletions</maml:name>
          <maml:description>
            <maml:para>If specified, reads from the 'deletions' subfolder instead of the main folder. This allows reading records that were present previously but have been deleted.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="proga">
          <maml:name>ProgressAction</maml:name>
          <maml:description>
            <maml:para>See standard PS docs.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">ActionPreference</command:parameterValue>
          <dev:type>
            <maml:name>ActionPreference</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>InputPath</maml:name>
        <maml:description>
          <maml:para>Path to folder to read JSON files from.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>deletions</maml:name>
        <maml:description>
          <maml:para>If specified, reads from the 'deletions' subfolder instead of the main folder. This allows reading records that were present previously but have been deleted.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="proga">
        <maml:name>ProgressAction</maml:name>
        <maml:description>
          <maml:para>See standard PS docs.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">ActionPreference</command:parameterValue>
        <dev:type>
          <maml:name>ActionPreference</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSObject</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Get-DataverseRecordsFolder -InputPath data/contacts | Set-DataverseRecord -connection $c</dev:code>
        <dev:remarks>
          <maml:para>Reads files from `data/contacts` and uses them to create/update records in Dataverse using the existing connection `$c`. See documentation for `Set-DataverseRecord` as there are option to control how/if existing records will be matched and updated.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>