en-US/EZLog-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>ConvertFrom-EZlog</command:name>
      <command:verb>ConvertFrom</command:verb>
      <command:noun>EZlog</command:noun>
      <maml:description>
        <maml:para>Cmdlet that convert an EZLog file to a set of objects.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This cmdlet allows from a log file generated by EZLog to get an object. The goal is to be able to easily filter on events with a single Where-Object and get to the info stored in the header and in the footer. </maml:para>
      <maml:para>Furthermore it eases the ability to transform the data to JSON if piped to ConvertTo-JSON.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertFrom-EZlog</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Path">
          <maml:name>FilePath</maml:name>
          <maml:description>
            <maml:para>Specify the log file's path.</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="1" aliases="Path">
        <maml:name>FilePath</maml:name>
        <maml:description>
          <maml:para>Specify the log file's path.</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:returnValues />
    <maml:alertSet>
      <maml:alert>
        <maml:para>AUTHOR: Arnaud PETITJEAN - arnaud@powershell-scripting.com LASTEDIT: 2016/11/15</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>ConvertFrom-EZlog -FilePath C:\temp\mylog.log</dev:code>
        <dev:remarks>
          <maml:para>Returns an object from the log file.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>ConvertFrom-EZlog -FilePath C:\temp\mylog.log | ConvertTo-JSON</dev:code>
        <dev:remarks>
          <maml:para>Get a JSON format from a logfile.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <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>Invoke-EZLogRotation</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>EZLogRotation</command:noun>
      <maml:description>
        <maml:para>Clean up old log files in order to keep only the most recent ones.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Ancient logs files are either deleted or archived into a Zip file.</maml:para>
      <maml:para>Options are available to specify how many newest files to keep. It's also possible to determine a time interval for the logs to keep (daily, monthly, yearly)</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Invoke-EZLogRotation</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>Directory containing the logs to rotate.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>Filter</maml:name>
          <maml:description>
            <maml:para>Pattern to identify the logs to rotate. Ex : .log, ezlog*.txt, etc.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Newest</maml:name>
          <maml:description>
            <maml:para>Specify how many files to keep in the directory. The files are sorted by the LastWriteTime attribute and only the newest files determined by this parameter are kept. Other files are deleted or archived.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ArchiveTo</maml:name>
          <maml:description>
            <maml:para>Indicate if the old logs need to be archived in a Zip before before deletion.</maml:para>
            <maml:para>If not specified, old logs are deleted.</maml:para>
            <maml:para>If specified, you must indicate a file path containing the .zip extension. Eg. : C:\logs\archive.zip</maml:para>
            <maml:para>If the archive file already exists, logs will be append to it. If you want to overwrite it you can use the -OverwriteArchive switch.</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>OverwriteArchive</maml:name>
          <maml:description>
            <maml:para>Works in association with -ArchiveTo. If specified, it overwrites an archive if it already exists.</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>Invoke-EZLogRotation</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Path</maml:name>
          <maml:description>
            <maml:para>Directory containing the logs to rotate.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>Filter</maml:name>
          <maml:description>
            <maml:para>Pattern to identify the logs to rotate. Ex : .log, ezlog*.txt, etc.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>Interval</maml:name>
          <maml:description>
            <maml:para>Specify the periodicy of the rotation. Possible values are : Daily, Monthly, Yearly</maml:para>
            <maml:para>Daily : Keep only the logs of the day Monthly : Keep only the logs of the month Yearly : Keep only the logs of the year</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">Daily</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Monthly</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Yearly</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">Interval</command:parameterValue>
          <dev:type>
            <maml:name>Interval</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>ArchiveTo</maml:name>
          <maml:description>
            <maml:para>Indicate if the old logs need to be archived in a Zip before before deletion.</maml:para>
            <maml:para>If not specified, old logs are deleted.</maml:para>
            <maml:para>If specified, you must indicate a file path containing the .zip extension. Eg. : C:\logs\archive.zip</maml:para>
            <maml:para>If the archive file already exists, logs will be append to it. If you want to overwrite it you can use the -OverwriteArchive switch.</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>OverwriteArchive</maml:name>
          <maml:description>
            <maml:para>Works in association with -ArchiveTo. If specified, it overwrites an archive if it already exists.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>Directory containing the logs to rotate.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
        <maml:name>Filter</maml:name>
        <maml:description>
          <maml:para>Pattern to identify the logs to rotate. Ex : .log, ezlog*.txt, etc.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Newest</maml:name>
        <maml:description>
          <maml:para>Specify how many files to keep in the directory. The files are sorted by the LastWriteTime attribute and only the newest files determined by this parameter are kept. Other files are deleted or archived.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
        <maml:name>Interval</maml:name>
        <maml:description>
          <maml:para>Specify the periodicy of the rotation. Possible values are : Daily, Monthly, Yearly</maml:para>
          <maml:para>Daily : Keep only the logs of the day Monthly : Keep only the logs of the month Yearly : Keep only the logs of the year</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Interval</command:parameterValue>
        <dev:type>
          <maml:name>Interval</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>ArchiveTo</maml:name>
        <maml:description>
          <maml:para>Indicate if the old logs need to be archived in a Zip before before deletion.</maml:para>
          <maml:para>If not specified, old logs are deleted.</maml:para>
          <maml:para>If specified, you must indicate a file path containing the .zip extension. Eg. : C:\logs\archive.zip</maml:para>
          <maml:para>If the archive file already exists, logs will be append to it. If you want to overwrite it you can use the -OverwriteArchive switch.</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>OverwriteArchive</maml:name>
        <maml:description>
          <maml:para>Works in association with -ArchiveTo. If specified, it overwrites an archive if it already exists.</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:returnValues />
    <maml:alertSet>
      <maml:alert>
        <maml:para>AUTHOR: Arnaud PETITJEAN LASTEDIT: 2018/04/03</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Newest 15</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the latest 15 newest *.log files in the C:\LogFiles directory. Older files will be deleted.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Newest 15 -ArchiveTo C:\LogFiles\archive.zip</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the latest 15 newest *.log files in the C:\LogFiles directory. Before deletion, older files will be archived into the C:\LogFiles\archive.zip. If the archive.zip file already exists, logs will be appended to it.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Newest 15 -ArchiveTo C:\LogFiles\archive.zip -OverwriteArchive</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the latest 15 newest *.log files in the C:\LogFiles directory. Before deletion, older files will be archived into the C:\LogFiles\archive.zip. If the archive.zip file already exists it will be overwritten.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Interval Daily</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the *.log files of the day in the C:\LogFiles directory. Older files will be deleted.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 5 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Interval Monthly</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the *.log files of the month in the C:\LogFiles directory. Older files will be deleted.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 6 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Interval Monthly -ArchiveTo C:\LogFiles\archive.zip -Overwrite</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the *.log files of the month in the C:\LogFiles directory. Older files will be archived monthly.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 7 --------------------------</maml:title>
        <dev:code>Invoke-EZLogRotation -Path C:\LogFiles\*.log -Interval Yearly</dev:code>
        <dev:remarks>
          <maml:para>Only keeps the .log files of the current year in the C:\LogFiles directory matching the pattern .log. Older files will be deleted.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <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>Write-EZLog</command:name>
      <command:verb>Write</command:verb>
      <command:noun>EZLog</command:noun>
      <maml:description>
        <maml:para>Utility cmdlet to write logs to disk in an easy and pragmatic way.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>This cmdlet allows to write timestamped and nice formatted logs with a header and footer. It also allows to specify if the log entry being written is an info, a warning or an error.</maml:para>
      <maml:para>The header contains the following information : - full script path of the caller, </maml:para>
      <maml:para>- account under the script was run,</maml:para>
      <maml:para>- computer name of the machine whose executed the script,</maml:para>
      <maml:para>- and more...</maml:para>
      <maml:para></maml:para>
      <maml:para>The footer contains the elapsed time from the beginning of the log session.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Write-EZLog</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Category</maml:name>
          <maml:description>
            <maml:para>Category can be one of the following value : INF, WAR, ERR</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">INF</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">WAR</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ERR</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">MsgCategory</command:parameterValue>
          <dev:type>
            <maml:name>MsgCategory</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="Msg">
          <maml:name>Message</maml:name>
          <maml:description>
            <maml:para>Specify the content of the data to log.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>LogFile</maml:name>
          <maml:description>
            <maml:para>Path to the log file to be created.</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>Delimiter</maml:name>
          <maml:description>
            <maml:para>Specify a delimiter to be used in order to separate the fields in a log entry.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Char</command:parameterValue>
          <dev:type>
            <maml:name>Char</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>$( if ((Get-Culture).TextInfo.ListSeparator -eq ' ') {','} else {(Get-Culture).TextInfo.ListSeparator})</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ToScreen</maml:name>
          <maml:description>
            <maml:para>Displays the logs in the log file and in the console.</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>Write-EZLog</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Header</maml:name>
          <maml:description>
            <maml:para>Mandatory switch to start a log session.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>LogFile</maml:name>
          <maml:description>
            <maml:para>Path to the log file to be created.</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>Delimiter</maml:name>
          <maml:description>
            <maml:para>Specify a delimiter to be used in order to separate the fields in a log entry.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Char</command:parameterValue>
          <dev:type>
            <maml:name>Char</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>$( if ((Get-Culture).TextInfo.ListSeparator -eq ' ') {','} else {(Get-Culture).TextInfo.ListSeparator})</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ToScreen</maml:name>
          <maml:description>
            <maml:para>Displays the logs in the log file and in the console.</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>Write-EZLog</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Footer</maml:name>
          <maml:description>
            <maml:para>Mandatory switch to end a log session. If you omit to close your log session, you won't know how much time your script was running.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>LogFile</maml:name>
          <maml:description>
            <maml:para>Path to the log file to be created.</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>Delimiter</maml:name>
          <maml:description>
            <maml:para>Specify a delimiter to be used in order to separate the fields in a log entry.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Char</command:parameterValue>
          <dev:type>
            <maml:name>Char</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>$( if ((Get-Culture).TextInfo.ListSeparator -eq ' ') {','} else {(Get-Culture).TextInfo.ListSeparator})</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ToScreen</maml:name>
          <maml:description>
            <maml:para>Displays the logs in the log file and in the console.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Category</maml:name>
        <maml:description>
          <maml:para>Category can be one of the following value : INF, WAR, ERR</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">MsgCategory</command:parameterValue>
        <dev:type>
          <maml:name>MsgCategory</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="Msg">
        <maml:name>Message</maml:name>
        <maml:description>
          <maml:para>Specify the content of the data to log.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Header</maml:name>
        <maml:description>
          <maml:para>Mandatory switch to start a log session.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Footer</maml:name>
        <maml:description>
          <maml:para>Mandatory switch to end a log session. If you omit to close your log session, you won't know how much time your script was running.</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="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>LogFile</maml:name>
        <maml:description>
          <maml:para>Path to the log file to be created.</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>Delimiter</maml:name>
        <maml:description>
          <maml:para>Specify a delimiter to be used in order to separate the fields in a log entry.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Char</command:parameterValue>
        <dev:type>
          <maml:name>Char</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>$( if ((Get-Culture).TextInfo.ListSeparator -eq ' ') {','} else {(Get-Culture).TextInfo.ListSeparator})</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>ToScreen</maml:name>
        <maml:description>
          <maml:para>Displays the logs in the log file and in the console.</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:returnValues />
    <maml:alertSet>
      <maml:alert>
        <maml:para>AUTHOR: Arnaud PETITJEAN - apetitjean@start-scripting.io LASTEDIT: 2023/11/30</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code># First thing to do is write a header and define a log file where the data will be written to.

Write-EZLog -Header -LogFile C:\logs\mylogfile.log</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code># Next, anywhere in your script when you need to write a log, do one of the folowing command:

Write-EZLog -Category INF -Message 'This is an info to be written in the log file'
Write-EZLog -Category WAR -Message 'This is a warning to be written in the log file'
Write-EZLog -Category ERR -Message 'This is an error to be written in the log file'</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title>
        <dev:code># Finaly, to close your logfile you need to write a footer, just do that:

Write-EZLog -Footer</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title>
        <dev:code># If you want to see the logs in the PowerShell console whereas they are still written to disk, you can specify the -ToScreen switch.
# Info entries will be written in cyan color, Yellow for warnings, and Red for the errors.

Write-EZLog -Category WAR -Message 'This is a warning to be written in the log file' -ToScreen</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>See my Github repository</maml:linkText>
        <maml:uri>https://github.com/apetitjean/EZLog</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>