en-US/PSTree.dll-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-PSTree</command:name>
      <command:verb>Get</command:verb>
      <command:noun>PSTree</command:noun>
      <maml:description>
        <maml:para>`tree` like cmdlet for PowerShell.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>`Get-PSTree` is a PowerShell cmdlet that intends to emulate the `tree` command with added functionalities to calculate the folders size as well as recursive folders size.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-PSTree</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Depth</maml:name>
          <maml:description>
            <maml:para>Determines the number of subdirectory levels that are included in the recursion.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt32</command:parameterValue>
          <dev:type>
            <maml:name>UInt32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>3</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Directory</maml:name>
          <maml:description>
            <maml:para>Use this switch to display Directories only.</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="true" pipelineInput="False" position="named" aliases="none">
          <maml:name>Exclude</maml:name>
          <maml:description>
            <maml:para>Specifies an array of one or more string patterns to be matched as the cmdlet gets child items. Any matching item is excluded from the output. Wildcard characters are accepted.</maml:para>
            <maml:para>Excluded items do not add to the recursive folders size.</maml:para>
            <maml:para>&gt; NOTE : Patterns are tested against the object's `.FullName` property.</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>Force</maml:name>
          <maml:description>
            <maml:para>Gets items that otherwise can't be accessed by the user, such as hidden or system files.</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="True (ByPropertyName)" position="named" aliases="PSPath">
          <maml:name>LiteralPath</maml:name>
          <maml:description>
            <maml:para>Absolute or relative folder path. Note that the value is used exactly as it's typed. No characters are interpreted as wildcards.</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>Recurse</maml:name>
          <maml:description>
            <maml:para>Gets the items in the specified location and in all child items of the location.</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="none">
          <maml:name>RecursiveSize</maml:name>
          <maml:description>
            <maml:para>This switch enables the cmdlet to calculate the recursive size of folders in a hierarchy. By default, the cmdlet only displays the size of folders based on the sum of the file's Length in each directory. It's important to note that this is a more expensive operation, in order to calculate the recursive size, all items in the hierarchy needs to be traversed.</maml:para>
            <maml:para>By default, the size of hidden and system items is not added to the recursive size, for this you must use the `-Force` parameter. Excluded items with the `-Exclude` parameter do not add to the recursive size.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Get-PSTree</maml:name>
        <command:parameter required="false" variableLength="true" globbing="true" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>Specifies a path to one or more locations. Wildcards are accepted. The default location is the current directory (`.`).</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>Current directory</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Depth</maml:name>
          <maml:description>
            <maml:para>Determines the number of subdirectory levels that are included in the recursion.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt32</command:parameterValue>
          <dev:type>
            <maml:name>UInt32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>3</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Directory</maml:name>
          <maml:description>
            <maml:para>Use this switch to display Directories only.</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="true" pipelineInput="False" position="named" aliases="none">
          <maml:name>Exclude</maml:name>
          <maml:description>
            <maml:para>Specifies an array of one or more string patterns to be matched as the cmdlet gets child items. Any matching item is excluded from the output. Wildcard characters are accepted.</maml:para>
            <maml:para>Excluded items do not add to the recursive folders size.</maml:para>
            <maml:para>&gt; NOTE : Patterns are tested against the object's `.FullName` property.</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>Force</maml:name>
          <maml:description>
            <maml:para>Gets items that otherwise can't be accessed by the user, such as hidden or system files.</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="none">
          <maml:name>Recurse</maml:name>
          <maml:description>
            <maml:para>Gets the items in the specified location and in all child items of the location.</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="none">
          <maml:name>RecursiveSize</maml:name>
          <maml:description>
            <maml:para>This switch enables the cmdlet to calculate the recursive size of folders in a hierarchy. By default, the cmdlet only displays the size of folders based on the sum of the file's Length in each directory. It's important to note that this is a more expensive operation, in order to calculate the recursive size, all items in the hierarchy needs to be traversed.</maml:para>
            <maml:para>By default, the size of hidden and system items is not added to the recursive size, for this you must use the `-Force` parameter. Excluded items with the `-Exclude` parameter do not add to the recursive size.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Depth</maml:name>
        <maml:description>
          <maml:para>Determines the number of subdirectory levels that are included in the recursion.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt32</command:parameterValue>
        <dev:type>
          <maml:name>UInt32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>3</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Directory</maml:name>
        <maml:description>
          <maml:para>Use this switch to display Directories only.</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="true" pipelineInput="False" position="named" aliases="none">
        <maml:name>Exclude</maml:name>
        <maml:description>
          <maml:para>Specifies an array of one or more string patterns to be matched as the cmdlet gets child items. Any matching item is excluded from the output. Wildcard characters are accepted.</maml:para>
          <maml:para>Excluded items do not add to the recursive folders size.</maml:para>
          <maml:para>&gt; NOTE : Patterns are tested against the object's `.FullName` property.</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>Force</maml:name>
        <maml:description>
          <maml:para>Gets items that otherwise can't be accessed by the user, such as hidden or system files.</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="True (ByPropertyName)" position="named" aliases="PSPath">
        <maml:name>LiteralPath</maml:name>
        <maml:description>
          <maml:para>Absolute or relative folder path. Note that the value is used exactly as it's typed. No characters are interpreted as wildcards.</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="true" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>Specifies a path to one or more locations. Wildcards are accepted. The default location is the current directory (`.`).</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>Current directory</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Recurse</maml:name>
        <maml:description>
          <maml:para>Gets the items in the specified location and in all child items of the location.</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="none">
        <maml:name>RecursiveSize</maml:name>
        <maml:description>
          <maml:para>This switch enables the cmdlet to calculate the recursive size of folders in a hierarchy. By default, the cmdlet only displays the size of folders based on the sum of the file's Length in each directory. It's important to note that this is a more expensive operation, in order to calculate the recursive size, all items in the hierarchy needs to be traversed.</maml:para>
          <maml:para>By default, the size of hidden and system items is not added to the recursive size, for this you must use the `-Force` parameter. Excluded items with the `-Exclude` parameter do not add to the recursive size.</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:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>You can pipe a string that contains a path to this cmdlet. Output from `Get-Item` and `Get-ChildItem` can be piped to this cmdlet.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>PSTreeDirectory</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>PSTreeFile</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert />
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1: Get the current directory tree with default parameters values</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-PSTree</dev:code>
        <dev:remarks>
          <maml:para>The default parameter set uses `-Depth` with a value of 3. No hidden and system files folder are displayed and recursive folder size is not calculated.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Get the hierarchy of the `$HOME` directory recursively displaying only folders</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-PSTree $HOME -Directory -Recurse</dev:code>
        <dev:remarks>
          <maml:para>In this example `$HOME` is bound positionally to the `-Path` parameter.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 3: Recurse `$HOME` subdirectories 2 levels deep displaying hidden files and folders</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-PSTree -Depth 2 -Force</dev:code>
        <dev:remarks>
          <maml:para>The `-Force` switch is needed to display hidden files and folders. In addition, hidden child items do not add up to the folders size without this switch.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 4: Recurse the `C:\` drive 2 levels in depth displaying only folders with their recursive size</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-PSTree C:\ -Depth 2 -RecursiveSize -Directory</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 5: Get the `$HOME` directory hierarchy recursively excluding all `.jpg` and `.png` files</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-PSTree $HOME -Recurse -Exclude *.jpg, *.png</dev:code>
        <dev:remarks>
          <maml:para>The `-Exclude` parameter supports wildcard patterns (https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_wildcards?view=powershell-7.3), exclusion patterns are tested against the items `.FullName` property. Excluded items do not do not add to the folders size.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-- Example 6: Get the hierarchy of all folders in a location --</maml:title>
        <dev:code>PS ..\PSTree&gt; Get-ChildItem -Directory | Get-PSTree</dev:code>
        <dev:remarks>
          <maml:para>`DirectoryInfo` and `FileInfo` instances having the `PSPath` Property are bound to the `-LiteralPath` parameter.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/santisq/PSTree/blob/main/docs/en-US/Get-PSTree.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>