en-us/LibSnitcher.dll-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <!-- Cmdlet: Get-PeDependencyChain -->
  <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">
    <command:details>
      <command:name>Get-PeDependencyChain</command:name>
      <command:verb>Get</command:verb>
      <command:noun>PeDependencyChain</command:noun>
      <maml:description>
        <maml:para>Returns the module's dependency chain.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This Cmdlet returns the dependency chain for a given module.</maml:para>
      <maml:para>The input can be the path, name from a portable executable or a .NET fully qualified assembly name.</maml:para>
      <maml:para>Due the nature of cyclic dependencies, the command only resolves the dependencies for the first module's appearance.</maml:para>
      <maml:para>To return unique entries only, use the "Unique" parameter.</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: __AllParameterSets -->
      <command:syntaxItem>
        <maml:name>Get-PeDependencyChain</maml:name>
        <!-- Parameter: Path -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
            <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: Depth -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>Depth</maml:name>
          <maml:description>
            <maml:para>The maximum recursion depth.</maml:para>
            <maml:para>Depth 1 returns only the dependencies for the main module.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Unique -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>Unique</maml:name>
          <maml:description>
            <maml:para>Use this parameter to return only unique entries.</maml:para>
            <maml:para>Attention, despite returning all dependencies for the root module it might not return all dependencies for a child module.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: Path -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
          <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
          <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
          <maml:para>This is an alias of the Path parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: Unique -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>Unique</maml:name>
        <maml:description>
          <maml:para>Use this parameter to return only unique entries.</maml:para>
          <maml:para>Attention, despite returning all dependencies for the root module it might not return all dependencies for a child module.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Depth -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>Depth</maml:name>
        <maml:description>
          <maml:para>The maximum recursion depth.</maml:para>
          <maml:para>Depth 1 returns only the dependencies for the main module.</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues />
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <maml:introduction>
          <maml:para></maml:para>
        </maml:introduction>
        <dev:code>Get-PeDependencyChain -Path 'C:\Windows\explorer.exe'</dev:code>
        <dev:remarks>
          <maml:para>Returning the dependency chain from 'explorer.exe'.</maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 2 ----------</maml:title>
        <maml:introduction>
          <maml:para></maml:para>
        </maml:introduction>
        <dev:code>Get-PeDependencyChain -Name 'mscorlib, Version=4.0.0.0, Culture=neutral' -Unique</dev:code>
        <dev:remarks>
          <maml:para>Returning the dependency chain for 'mscorlib.dll', using an assembly qualified name. Unique values only.</maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
  </command:command>
  <!-- Cmdlet: Get-PeFailedDependency -->
  <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">
    <command:details>
      <command:name>Get-PeFailedDependency</command:name>
      <command:verb>Get</command:verb>
      <command:noun>PeFailedDependency</command:noun>
      <maml:description>
        <maml:para>Returns all dependencies that failed to load.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This Cmdlet returns all dependencies from a given module that failed to load.</maml:para>
      <maml:para>The input can be the path, name from a portable executable or a .NET fully qualified assembly name.</maml:para>
      <maml:para>Since it failed to load, the command does not return the path.</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: __AllParameterSets -->
      <command:syntaxItem>
        <maml:name>Get-PeFailedDependency</maml:name>
        <!-- Parameter: Path -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
            <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: ClrOnly -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ClrOnly</maml:name>
          <maml:description>
            <maml:para>Use this parameter to return only dependencies that are .NET assemblies.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: Path -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
          <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="0" aliases="Name">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>The path, name for a portable executable, or .NET assembly fully qualified name.</maml:para>
          <maml:para>The Cmdlet will resolve by attempting to load the module.</maml:para>
          <maml:para>This is an alias of the Path parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: ClrOnly -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>ClrOnly</maml:name>
        <maml:description>
          <maml:para>Use this parameter to return only dependencies that are .NET assemblies.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues />
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <maml:introduction>
          <maml:para></maml:para>
        </maml:introduction>
        <dev:code>Get-PeFailedDependency -Path 'C:\Program Files\PowerShell\7-preview\System.Security.Cryptography.dll'</dev:code>
        <dev:remarks>
          <maml:para>Returning all dependencies from 'System.Security.Cryptography.dll' that failed to load.</maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 2 ----------</maml:title>
        <maml:introduction>
          <maml:para></maml:para>
        </maml:introduction>
        <dev:code>Get-PeFailedDependency -Name 'System.Threading, Version=8.0.0.0, Culture=neutral' -ClrOnly</dev:code>
        <dev:remarks>
          <maml:para>Returning only .NET dependencies from 'System.Threading' that failed to load.</maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
  </command:command>
  <!-- Cmdlet: Get-PeHeaders -->
  <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">
    <command:details>
      <command:name>Get-PeHeaders</command:name>
      <command:verb>Get</command:verb>
      <command:noun>PeHeaders</command:noun>
      <maml:description>
        <maml:para>Returns the Portable Executable headers.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This Cmdlet returns the PE headers for a given portable executable.</maml:para>
      <maml:para>Although implemented differently, it mimics the 'System.Reflection.PortableExecutable' from .NET core.</maml:para>
      <maml:para>You can achieve the same result by creating a new 'LibSnitcher.PortableExecutable' object.</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: __AllParameterSets -->
      <command:syntaxItem>
        <maml:name>Get-PeHeaders</maml:name>
        <!-- Parameter: Path -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>The path to a portable executable.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: Path -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>The path to a portable executable.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <!-- OutputType: PortableExecutable -->
      <command:returnValue>
        <dev:type>
          <maml:name>LibSnitcher.PortableExecutable</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
    </command:returnValues>
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <maml:introduction>
          <maml:para></maml:para>
        </maml:introduction>
        <dev:code>Get-PeHeaders -Path "$env:SystemRoot\System32\kernel32.dll"</dev:code>
      </command:example>
    </command:examples>
  </command:command>
</helpItems>