en/Microsoft.SqlServer.Assessment.Cmdlets.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-SqlAssessmentItem</command:name>
      <command:verb>Get</command:verb>
      <command:noun>SqlAssessmentItem</command:noun>
      <maml:description>
        <maml:para>Gets SQL Assessment best practice checks available for a chosen SQL Server object.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The Get-SqlAssessmentItem cmdlet finds all available best practice checks for each input object. Learn more about the SQL Assessment API on its Microsoft Docs page (https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview).</maml:para>
      <maml:para>This cmdlet accepts the following input types:</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.Server</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.Database</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.FileGroup</maml:para>
      <maml:para>- String containing path to any object of the above types</maml:para>
      <maml:para>- Collection of objects</maml:para>
      <maml:para></maml:para>
      <maml:para>You can get input objects with SqlServer cmdlets like Get-SqlInstance and Get-SqlDatabase or basic PowerShell cmdlets like Get-Item and Get-ChildItem. Also, the cmdlet supports the SQL Server PowerShell provider, so it can obtain an object from its path. The path can be passed explicitly, otherwise the current path will be used.</maml:para>
      <maml:para>Availability of a check for a chosen object varies on SQL Server version, platform, object type, and name. And besides, you can additionally filter checks with the parameters -MinSeverity and -Check.</maml:para>
      <maml:para>Custom configurations can be applied with the -Configuration parameter. Customization examples are available on Github (https://go.microsoft.com/fwlink/?linkid=2099023).</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-SqlAssessmentItem</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="10" aliases="Target">
          <maml:name>InputObject</maml:name>
          <maml:Description>
            <maml:para>Specifies a SQL Server object or a path to such an object. The cmdlet returns appropriate checks for this object. When this parameter is omitted, current location is used as input object. If current location is not a supported SQL Server object, the cmdlet signals an error.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
          <dev:type>
            <maml:name>PSObject</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>Check</maml:name>
          <maml:Description>
            <maml:para>One or more checks, check IDs, or tags. For every check object, Get-SqlAssessmentItem returns that check if it supports input object. For every check ID, Get-SqlAssessmentItem returns the corresponding check if it supports input object. For tags, Get-SqlAssessmentItem returns checks with any of those tags.</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>Configuration</maml:name>
          <maml:Description>
            <maml:para>Specifies paths to files containing custom configuration. Customization files will be applied to default configuration in specified order. The scope is limited to this cmdlet invocation only.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
          <dev:type>
            <maml:name>PSObject</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="Severity">
          <maml:name>MinSeverity</maml:name>
          <maml:Description>
            <maml:para>Specifies minimum severity level for checks to be found.</maml:para>
            <maml:para>For example, checks of Warning or Information levels will not be returned when -MinSeverity=Critical.</maml:para>
            <maml:para>Possible values: Information , Warning , Critical</maml:para>
          </maml:Description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">None</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Information</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Warning</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Critical</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">SeverityLevel</command:parameterValue>
          <dev:type>
            <maml:name>SeverityLevel</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Information</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>Check</maml:name>
        <maml:Description>
          <maml:para>One or more checks, check IDs, or tags. For every check object, Get-SqlAssessmentItem returns that check if it supports input object. For every check ID, Get-SqlAssessmentItem returns the corresponding check if it supports input object. For tags, Get-SqlAssessmentItem returns checks with any of those tags.</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>Configuration</maml:name>
        <maml:Description>
          <maml:para>Specifies paths to files containing custom configuration. Customization files will be applied to default configuration in specified order. The scope is limited to this cmdlet invocation only.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
        <dev:type>
          <maml:name>PSObject</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="10" aliases="Target">
        <maml:name>InputObject</maml:name>
        <maml:Description>
          <maml:para>Specifies a SQL Server object or a path to such an object. The cmdlet returns appropriate checks for this object. When this parameter is omitted, current location is used as input object. If current location is not a supported SQL Server object, the cmdlet signals an error.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
        <dev:type>
          <maml:name>PSObject</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="Severity">
        <maml:name>MinSeverity</maml:name>
        <maml:Description>
          <maml:para>Specifies minimum severity level for checks to be found.</maml:para>
          <maml:para>For example, checks of Warning or Information levels will not be returned when -MinSeverity=Critical.</maml:para>
          <maml:para>Possible values: Information , Warning , Critical</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">SeverityLevel</command:parameterValue>
        <dev:type>
          <maml:name>SeverityLevel</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>Information</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:inputType>
        <dev:type>
          <maml:name>Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Microsoft.SqlServer.Management.Assessment.ICheck</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: Get checks for local default instance -------</maml:title>
        <dev:code>PS:&gt; Get-SqlInstance -ServerInstance 'localhost' | Get-SqlAssessmentItem
 
 Target: [LOCAL]
 
Id Enabled DisplayName
-- ------- -----------
SqlServer.Server.TraceFlag.634 True TF 634 Disables Background Columnstore Compression
SqlServer.Server.NoDefaultTraceFoundIsNotActive True No default trace was found or is not active
SqlServer.Server.HintsStatistics True Hints are being used
SqlServer.Server.PlansUseRatio True Amount of single use plans in cache is high
...</dev:code>
        <dev:remarks>
          <maml:para>This example gets all checks available for the default instance of SQL Server running on the current machine.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- Example 2: Get checks with Get-Item cmdlet ----------</maml:title>
        <dev:code>PS:&gt; Get-Item SQLSERVER:\SQL\localhost\default | Get-SqlAssessmentItem</dev:code>
        <dev:remarks>
          <maml:para>This example gets all checks available for the default instance of SQL Server running on the current machine.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>------- Example 3: Get checks with path to target object -------</maml:title>
        <dev:code>PS:&gt; Get-SqlAssessmentItem SQLSERVER:\SQL\localhost\default</dev:code>
        <dev:remarks>
          <maml:para>This example gets all checks available for the default instance of SQL Server running on the current machine.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--- Example 4: Get checks with applied custom configuration ---</maml:title>
        <dev:code>PS:&gt; cd SQLSERVER:\SQL\localhost
PS:&gt; Get-Item default | Get-SqlAssessmentItem -Configuration C:\SqlServerAssessment\profileA.json, C:\SqlServerAssessment\profileB.json</dev:code>
        <dev:remarks>
          <maml:para>This example gets all available checks with applied custom configuration obtained from specified JSON files. Visit SQL Assessment samples folder (https://go.microsoft.com/fwlink/?linkid=2099023)on Github to find out how to make customization.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>----- Example 5: Get checks for all instances on localhost -----</maml:title>
        <dev:code>PS:&gt; dir SQLSERVER:\SQL\localhost | Get-SqlAssessmentItem</dev:code>
        <dev:remarks>
          <maml:para>This example shows Get-SqlAssessmentItem cmdlet accepting a set of SQL Server instances via pipeline.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 6: Get checks for all instances with names ending with numbers</maml:title>
        <dev:code>PS:&gt; dir SQLSERVER:\SQL\localhost | Where { $_.Name -Match '.*\d+' } | Get-SqlAssessmentItem</dev:code>
        <dev:remarks>
          <maml:para>This example shows Get-SqlAssessmentItem cmdlet accepting a set of SQL Server instances via pipeline. The set is filtered with the standard PowerShell facilities.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--------- Example 7: Get checks for a database by path ---------</maml:title>
        <dev:code>PS:&gt; Get-SqlAssessmentItem SQLSERVER:\SQL\localhost\default\Databases\master</dev:code>
        <dev:remarks>
          <maml:para>This example shows Get-SqlAssessmentItem cmdlet accepting a path to a SQL Server database.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------- Example 8: Get critical checks for a database --------</maml:title>
        <dev:code>PS:&gt; cd SQLSERVER:\SQL\localhost\default\Databases\master
PS:&gt; Get-SqlAssessmentItem -MinSeverity Critical</dev:code>
        <dev:remarks>
          <maml:para>This example shows Get-SqlAssessmentItem returning available checks with critical severity for the master database. It accepts the current location as the target.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-- Example 9: Get checks for all databases on local instance --</maml:title>
        <dev:code>PS:&gt; Get-SqlDatabase -ServerInstance 'localhost\instance1' | Get-SqlAssessmentItem</dev:code>
        <dev:remarks>
          <maml:para>This example shows obtaining a list of available checks for all databases returned by Get-SqlDatabase cmdlet.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------------- Example 10: Get checks by tag ----------------</maml:title>
        <dev:code>PS:&gt; Get-SqlInstance -ServerInstance . | Get-SqlAssessmentItem -Check Backup</dev:code>
        <dev:remarks>
          <maml:para>This example shows Get-SqlAssessmentItem cmdlet returning all backup-related checks for every SQL Server instance on the local server.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 11: Get recommendations for interactively selected checks</maml:title>
        <dev:code>PS:&gt; $serverInstance = Get-SqlInstance -ServerInstance '(local)'
PS:&gt; $checks = Get-SqlAssessmentItem $serverInstance | Select Id, Description | Out-GridView -PassThru
PS:&gt; Invoke-SqlAssessment $serverInstance -Check $checks</dev:code>
        <dev:remarks>
          <maml:para>The second line of this example shows obtaining checks for a $serverInstance, and selecting some of them interactively. Selected items are stored in an array variable, which then can be used as input for Invoke-SqlAssessment cmdlet. In this case, only picked checks will run during the assessment process.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>SQL Assessment API Online Documentation page</maml:linkText>
        <maml:uri>https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>SQL Assessment Samples</maml:linkText>
        <maml:uri>https://go.microsoft.com/fwlink/?linkid=2099023</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>Invoke-SqlAssessment</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>SqlAssessment</command:noun>
      <maml:description>
        <maml:para>Runs SQL Assessment best practice checks for a chosen SQL Server object and returns their results.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The Invoke-SqlAssessment cmdlet runs an assessment for each input object and returns a list of best practice recommendations that should be applied to the specified objects. It's up to you to follow the given recommendations or not. Learn more about the SQL Assessment API on its Microsoft Docs page (https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview).</maml:para>
      <maml:para>This cmdlet accepts the following input types:</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.Server</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.Database</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:para>
      <maml:para>- Microsoft.SqlServer.Management.Smo.FileGroup</maml:para>
      <maml:para>- String containing path to any object of the above types</maml:para>
      <maml:para>- Collection of objects</maml:para>
      <maml:para></maml:para>
      <maml:para>You can get input objects with SqlServer cmdlets like Get-SqlInstance and Get-SqlDatabase or basic PowerShell cmdlets like Get-Item and Get-ChildItem. Also, the cmdlet supports the SQL Server PowerShell provider, so it can obtain an object from its path. The path can be passed explicitly, otherwise the current path will be used.</maml:para>
      <maml:para>Availability of a check for a chosen object varies on SQL Server version, platform, object type, and name. And besides, you can additionally filter checks with the parameters -MinSeverity and -Check.</maml:para>
      <maml:para>You can get a list of checks applicable to the given SQL Server object with Get-SqlAssessmentItem cmdlet. Also, you can use this cmdlet's output as input for Invoke-SqlAssessment cmdlet.</maml:para>
      <maml:para>The cmdlet runs only checks that are applicable to an input object. For example, database checks will not be run for a SQL Server instance or an availability group, even when specified in -Check list.</maml:para>
      <maml:para>Custom configurations can be applied with the -Configuration parameter. Customization examples are available on Github (https://go.microsoft.com/fwlink/?linkid=2099023). Invoke-SqlAssessment cmdlet's output is a list of violated best practices for every given SQL Server object. Use Description property to learn about the best practice and Message property to find out how it can be solved. Also, every check result contains a link to online documentation, which will help you figure out the issue better.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Invoke-SqlAssessment</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="10" aliases="Target">
          <maml:name>InputObject</maml:name>
          <maml:Description>
            <maml:para>Specifies a SQL Server object or the path to such an object. The cmdlet runs assessment for this object. When this parameter is omitted, current location is used as input object. If current location is not a supported SQL Server object, the cmdlet signals an error.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
          <dev:type>
            <maml:name>PSObject</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>Check</maml:name>
          <maml:Description>
            <maml:para>One or more checks, check IDs, or tags. For every check object, Invoke-SqlAssessment runs that check if it supports input object. For every check ID, Invoke-SqlAssessment runs the corresponding check if it supports input object. For tags, Invoke-SqlAssessment runs checks with any of those tags.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
          <dev:type>
            <maml:name>Object[]</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>Configuration</maml:name>
          <maml:Description>
            <maml:para>Specifies paths to files containing custom configuration. Customization files will be applied to default configuration in specified order. The scope is limited to this cmdlet invocation only.</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
          <dev:type>
            <maml:name>PSObject</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="Severity">
          <maml:name>MinSeverity</maml:name>
          <maml:Description>
            <maml:para>Specifies minimum severity level for checks to be found.</maml:para>
            <maml:para>For example, checks of Warning or Information levels will not be returned when -MinSeverity=Critical.</maml:para>
            <maml:para>Possible values: Information , Warning , Critical</maml:para>
          </maml:Description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">None</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Information</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Warning</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Critical</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">SeverityLevel</command:parameterValue>
          <dev:type>
            <maml:name>SeverityLevel</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</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>Check</maml:name>
        <maml:Description>
          <maml:para>One or more checks, check IDs, or tags. For every check object, Invoke-SqlAssessment runs that check if it supports input object. For every check ID, Invoke-SqlAssessment runs the corresponding check if it supports input object. For tags, Invoke-SqlAssessment runs checks with any of those tags.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
        <dev:type>
          <maml:name>Object[]</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>Configuration</maml:name>
        <maml:Description>
          <maml:para>Specifies paths to files containing custom configuration. Customization files will be applied to default configuration in specified order. The scope is limited to this cmdlet invocation only.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
        <dev:type>
          <maml:name>PSObject</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="10" aliases="Target">
        <maml:name>InputObject</maml:name>
        <maml:Description>
          <maml:para>Specifies a SQL Server object or the path to such an object. The cmdlet runs assessment for this object. When this parameter is omitted, current location is used as input object. If current location is not a supported SQL Server object, the cmdlet signals an error.</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue>
        <dev:type>
          <maml:name>PSObject</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="Severity">
        <maml:name>MinSeverity</maml:name>
        <maml:Description>
          <maml:para>Specifies minimum severity level for checks to be found.</maml:para>
          <maml:para>For example, checks of Warning or Information levels will not be returned when -MinSeverity=Critical.</maml:para>
          <maml:para>Possible values: Information , Warning , Critical</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">SeverityLevel</command:parameterValue>
        <dev:type>
          <maml:name>SeverityLevel</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:inputType>
        <dev:type>
          <maml:name>Microsoft.SqlServer.Management.Smo.SqlSmoObject[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Microsoft.SqlServer.Assessment.Cmdlets.AssessmentNote</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: Invoke assessment for local default instance ---</maml:title>
        <dev:code>PS:&gt; Get-SqlInstance -ServerInstance 'localhost' | Invoke-SqlAssessment
 
TargetPath : Server[@Name='LOCAL']
HelpLink : https://support.microsoft.com/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an
             https://docs.microsoft.com/sql/database-engine/install-windows/install-sql-server-servicing-updates
Severity : Warning
CheckName : SQL Server instance is not up to date
CheckId : SqlServer.Server.LatestCUInstalled
Message : Product version 14.0.2014 is not the latest available. We recommend keeping your SQL Server up to date and install Service
             Packs and Cumulative Updates as they are released.
TargetType : Server</dev:code>
        <dev:remarks>
          <maml:para>This example shows how to get all best practice recommendations for the default instance of SQL Server running on the current machine.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--- Example 2: Invoke assessment for local default instance ---</maml:title>
        <dev:code>PS:&gt; Get-Item SQLSERVER:\SQL\localhost\default | Invoke-SqlAssessment</dev:code>
        <dev:remarks>
          <maml:para>This example shows how to get all best practice recommendations for the default instance of SQL Server.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>- Example 3: Invoke assessment for an obect specified by path -</maml:title>
        <dev:code>PS:&gt; Invoke-SqlAssessment SQLSERVER:\SQL\localhost\default</dev:code>
        <dev:remarks>
          <maml:para>This example shows how to get all best practice recommendations for the default instance of SQL Server.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---- Example 4: Invoke assessment with custom configuration ----</maml:title>
        <dev:code>PS:&gt; cd SQLSERVER:\SQL\localhost
PS:&gt; Get-Item default | Invoke-SqlAssessment -Configuration C:\SqlServerAssessment\profileA.json, C:\SqlServerAssessment\profileB.json</dev:code>
        <dev:remarks>
          <maml:para>This example shows how to apply custom configuration to get a modified set of best practice recommendations. Custom configurations are described in JSON files. Visit SQL Assessment samples folder (https://go.microsoft.com/fwlink/?linkid=2099023)on Github to find out how to make customization.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>- Example 5: Invoke assessment for all instances on localhost -</maml:title>
        <dev:code>PS:&gt; dir SQLSERVER:\SQL\localhost | Invoke-SqlAssessment</dev:code>
        <dev:remarks>
          <maml:para>This example shows Invoke-SqlAssessment cmdlet accepting a set of SQL Server instances via pipeline.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 6: Invoke assessment for all instances with names ending with numbers</maml:title>
        <dev:code>PS:&gt; dir SQLSERVER:\SQL\localhost | Where { $_.Name -Match '.*\d+' } | Invoke-SqlAssessment</dev:code>
        <dev:remarks>
          <maml:para>This example shows Invoke-SqlAssessment cmdlet accepting a set of SQL Server instances via pipeline. The set is filtered with the standard PowerShell facilities.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>----- Example 7: Invoke assessment for a database by path -----</maml:title>
        <dev:code>PS:&gt; Invoke-SqlAssessment SQLSERVER:\SQL\localhost\default\Databases\master</dev:code>
        <dev:remarks>
          <maml:para>This example shows Invoke-SqlAssessment cmdlet accepting the path to a SQL Server database.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>------- Example 8: Detect critical issues for a database -------</maml:title>
        <dev:code>PS:&gt; cd SQLSERVER:\SQL\localhost\default\Databases\master
PS:&gt; Invoke-SqlAssessment -MinSeverity Critical</dev:code>
        <dev:remarks>
          <maml:para>This example shows Invoke-SqlAssessment cmdlet assessing the current location. Only critical issues are reported.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 9: Invoke assessment for all databases on local instance</maml:title>
        <dev:code>PS:&gt; Get-SqlDatabase -ServerInstance 'localhost\instance1' | Invoke-SqlAssessment</dev:code>
        <dev:remarks>
          <maml:para>This example invokes assessment for all databases returned by Get-SqlDatabase cmdlet.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------------- Example 10: Get checks by tag ----------------</maml:title>
        <dev:code>PS:&gt; Get-SqlInstance -ServerInstance . | Invoke-SqlAssessment -Check Backup -Verbose</dev:code>
        <dev:remarks>
          <maml:para>This example shows Invoke-SqlAssessment cmdlet running all backup-related checks for every SQL Server instance on the local server.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 11: Get recommendations for interactively selected checks</maml:title>
        <dev:code>PS:&gt; $serverInstance = Get-SqlInstance -ServerInstance '(local)'
PS:&gt; $checks = Get-SqlAssessmentItem $serverInstance | Select Name, Description | Out-GridView -PassThru
PS:&gt; Invoke-SqlAssessment $serverInstance -Check $checks</dev:code>
        <dev:remarks>
          <maml:para>The second line of this example shows obtaining checks for a $serverInstance, and selecting some of them interactively. Selected items are stored in an array variable, which then is used as input for Invoke-SqlAssessment cmdlet. Only picked checks run during the assessment process.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>SQL Assessment API Online Documentation page</maml:linkText>
        <maml:uri>https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>SQL Assessment Samples</maml:linkText>
        <maml:uri>https://go.microsoft.com/fwlink/?linkid=2099023</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>