Chapters/writing-full-help/Solution/TMSample/en-us/TMSample-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-TMRemoteListeningConfiguration</command:name>
      <command:verb>Get</command:verb>
      <command:noun>TMRemoteListeningConfiguration</command:noun>
      <maml:description>
        <maml:para>Test remote listening ports.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This command will be used to test the network listening configuration on one or more remote computers. It will test if standard PowerShell remoting is enabled on both ports 5985 and 5986. It will also test if SSH is enabled on port 22.</maml:para>
      <maml:para>Because the command is testing at the network layer, you do not need to use any credentials.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-TMRemoteListeningConfiguration</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="CN">
          <maml:name>Computername</maml:name>
          <maml:Description>
            <maml:para>Specify the name of IP address of a remote computer.</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="1" aliases="none">
          <maml:name>ErrorLog</maml:name>
          <maml:Description>
            <maml:para>Specify the path to a text file to log errors. Entries will be automatically appended. Make sure the folder location exists.</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:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="CN">
        <maml:name>Computername</maml:name>
        <maml:Description>
          <maml:para>Specify the name of IP address of a remote computer.</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="1" aliases="none">
        <maml:name>ErrorLog</maml:name>
        <maml:Description>
          <maml:para>Specify the path to a text file to log errors. Entries will be automatically appended. Make sure the folder location exists.</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:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</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-TMRemoteListeningConfiguration -Computername srv1
 
Computername : SRV1
Date : 7/28/2020 5:13:57 PM
WSManHTTP : True
RemoteAddress : 192.168.3.50
WSManHTTPS : False
SSH : False</dev:code>
        <dev:remarks>
          <maml:para>Get configuration information for a single computer.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Get-Content c:\work\computers.txt | Get-TMRemoteListeningConfiguration -errorlog c:\work\tmerrors.txt | Export-CSV c:\work\results.csv -NoTypeinformation</dev:code>
        <dev:remarks>
          <maml:para>Get remote listening information for every computer in the computers.txt file and export results to a CSV file. Any errors will be logged to c:\work\tmerrors.txt.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Test-NetConnection</maml:linkText>
        <maml:uri></maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <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-TMTrustedHosts</command:name>
      <command:verb>Get</command:verb>
      <command:noun>TMTrustedHosts</command:noun>
      <maml:description>
        <maml:para>Get TrustedHosts settings from a remote computer.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Use this command to connect to a remote computer and determine what values it has for TrustedHosts. You can connect to a computer by its name or an existing PSSession.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-TMTrustedHosts</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
          <maml:name>ComputerName</maml:name>
          <maml:Description>
            <maml:para>Specify the name of a remote computer.</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:syntaxItem>
      <command:syntaxItem>
        <maml:name>Get-TMTrustedHosts</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>PSSession</maml:name>
          <maml:Description>
            <maml:para>Specify an existing PSSession.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSSession[]</command:parameterValue>
          <dev:type>
            <maml:name>PSSession[]</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="0" aliases="none">
        <maml:name>ComputerName</maml:name>
        <maml:Description>
          <maml:para>Specify the name of a remote computer.</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>PSSession</maml:name>
        <maml:Description>
          <maml:para>Specify an existing PSSession.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSSession[]</command:parameterValue>
        <dev:type>
          <maml:name>PSSession[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</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-TMTrustedHosts -computername SRV1</dev:code>
        <dev:remarks>
          <maml:para>Get trusted hosts information for SRV1.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Get-PSSession | Get-TMTrustedHosts | Export-CSV c:\work\trusted.csv</dev:code>
        <dev:remarks>
          <maml:para>Get trusted hosts settings using all of the existing PSSessions and export results to a CSV file.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Connect-WSMan</maml:linkText>
        <maml:uri></maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>