Invoke-SqlAssessment
選択したSQL Server オブジェクトに対して SQL Assessment のベスト プラクティス チェックを実行し、その結果を返します。
構文
Invoke-SqlAssessment
[-Check <Object[]>]
[[-InputObject] <PSObject>]
[-Configuration <PSObject>]
[-MinSeverity <SeverityLevel>]
[-FlattenOutput]
[<CommonParameters>]
説明
Invoke-SqlAssessment コマンドレットは、入力オブジェクトごとに評価を実行し、指定されたオブジェクトに適用する必要があるベスト プラクティスの推奨事項の一覧を返します。 指定された推奨事項に従うか、従わないかは、ユーザーが行う必要があります。 詳細については、 SQL Assessment API の概要に関するページを参照してください。
このコマンドレットは、次の入力の種類を受け入れます。
- Microsoft.SqlServer.Management.Smo.Server
- Microsoft.SqlServer.Management.Smo.Database
- Microsoft.SqlServer.Management.Smo.AvailabilityGroup
- Microsoft.SqlServer.Management.Smo.FileGroup
- Microsoft.SqlServer.Management.Smo.RegisteredServers.RegisteredServer
- 上記の型の任意のオブジェクトへのパスを含む文字列
- オブジェクトのコレクション
Get-SqlInstanceやGet-SqlDatabaseなどの SqlServer コマンドレット、または Get-Item や Get-ChildItem などの基本的な PowerShell コマンドレットを使用して、入力オブジェクトを取得できます。 また、 コマンドレットは、SQL Server PowerShell プロバイダーをサポートしているため、そのパスからオブジェクトを取得できます。 パスは明示的に渡すことができます。それ以外の場合は、現在のパスが使用されます。
選択したオブジェクトに対するチェックの可用性は、SQL Serverバージョン、プラットフォーム、およびオブジェクトの種類によって異なります。 また、 や master
などのtempdb
特定のデータベースを対象とするチェックもあります。 さらに、パラメーター -MinSeverity と -Check を使用して、タグ、名前、重大度でチェックをフィルター処理できます。
Get-SqlAssessmentItem コマンドレットを使用して、指定したSQL Server オブジェクトに適用できるチェックの一覧を取得できます。
コマンドレットは、入力オブジェクトに適用できるチェックのみを実行します。 たとえば、-Check list で指定されている場合でも、SQL Server インスタンスまたは可用性グループに対してデータベース チェックは実行されません。
カスタム構成は、-Configuration パラメーターを使用して適用できます。 カスタマイズの例は 、Github で入手できます。
注: 最初のパブリック プレビューでは 、Invoke-SqlAssessment は、CheckId プロパティと CheckName プロパティに Check の ID と DisplayName をそれぞれ含む AssessmentNote オブジェクトを返しました。 2 番目のパブリック プレビューでは、2 つのプロパティは、より多くのデータを提供する単一の Check プロパティに置き換えられました。 $noteが Invoke-SqlAssessment によって返されたオブジェクトであると仮定すると、$noteではなく$note.Check.Id としてチェックの ID にアクセスできます。CheckId、または$noteとしてチェックの説明。Check.Description。 -FlattenOutput パラメーターを使用すると、CheckId と CheckName で前の形式の結果を取得できます。 このパラメーターは、 Write-SqlTableData などの一部のコマンドレットとの互換性を維持するのにも役立ちます。 詳細については、例 12 から 14 を参照してください。
Invoke-SqlAssessment コマンドレットの出力は、特定のSQL Server オブジェクトごとに違反したベスト プラクティスの一覧です。 Description プロパティを使用して、ベスト プラクティスと Message プロパティを使用して、その解決方法を確認します。 また、すべてのチェック結果にはオンライン ドキュメントへのリンクが含まれています。これは、問題をより適切に把握するのに役立ちます。
Azure VM のサポートに関するSQL Server
SQL Assessment コマンドレットを使用すると、Azure VM 上のSQL ServerのインスタンスをオンプレミスのSQL Serverとしてだけでなく、Azure VM 上のSQL Serverに固有の規則 (仮想マシンの構成に関する情報を使用するもの) を使用して評価できます。 たとえば、AzSqlVmSize ルールは、Azure VM 上で SQL Server のインスタンスをホストする VM のサイズが推奨されていることを確認します。
このような規則を使用するには、Azure PowerShell モジュールを使用して Azure に接続し、Az.ResourceGraph モジュールがインストールされていることを確認します。
Azure VM インスタンス上のSQL Serverに対して SQL Assessment を呼び出す前に、Azure PowerShellでサインインします。 例 16 は、対話型サインイン プロセスとサブスクリプションの選択を示しています。
注: PowerShell セッション間で永続化された Azure アカウント接続を使用できます。つまり、1 つのセッションでConnect-AzAccountを呼び出し、後でこのコマンドを省略できます。 ただし、現在のバージョンの SQL Assessment コマンドレットでは、Az.ResourceGraph モジュールを明示的にインポートする必要があります:Import-Module Az.ResourceGraph
例
例 1: ローカルの既定のインスタンスの評価を呼び出す
PS:> Get-SqlInstance -ServerInstance localhost | Invoke-SqlAssessment
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
...
この例では、現在のコンピューターで実行されている SQL Serverの既定のインスタンスに関するすべてのベスト プラクティスの推奨事項を取得する方法を示します。
例 2: PSProvider コマンドレットを使用して評価を呼び出す
PS:> Get-Item SQLSERVER:\SQL\localhost\default | Invoke-SqlAssessment
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
...
この例では、SQL Serverの既定のインスタンスに関するすべてのベスト プラクティスの推奨事項を取得する方法を示します。
例 3: PS プロバイダー パスを使用して評価を呼び出す
PS:> Invoke-SqlAssessment SQLSERVER:\SQL\localhost\default
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
...
この例では、SQL Serverの既定のインスタンスに関するすべてのベスト プラクティスの推奨事項を取得する方法を示します。
例 4: カスタム構成を使用して評価を呼び出す
PS:> Get-SqlInstance -ServerInstance '(local)' | Invoke-SqlAssessment -Configuration C:\profileA.json, C:\profileB.json
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi A custom rule violation detected. CustomRuleA Profile A 1.0
...
この例では、カスタム構成を適用して、ベスト プラクティスの推奨事項の変更されたセットを取得する方法を示します。 カスタム構成については、JSON ファイルで説明されています。 カスタム ルールセット profileA.json と profileB.json では、いくつかのチェックが無効になり、いくつかの新しいチェックが導入されました。 profileA.json からの新しいチェックの 1 つで、SQL Server インスタンスの現在の構成に関する問題が検出されました。 カスタマイズの方法については、Github の SQL Assessment サンプル フォルダー にアクセスしてください。
例 5: すべてのインスタンスに対して評価を呼び出す
PS:> dir SQLSERVER:\SQL\localhost | Invoke-SqlAssessment
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
TargetPath : Server[@Name='LOCAL\INSTANCE1']
Sev. Message Check ID Origin
---- ------- -------- ------
Medi Product version 14.0.1000 is not the latest available. Keep your LatestCU Microsoft Ruleset 0.1.202
your SQL Server up to date and install Service Packs and
Cumulative Updates as they are released.
...
この例では、パイプラインを介して一連のSQL Server インスタンスを受け入れる Invoke-SqlAssessment コマンドレットを示します。
例 6: フィルター処理されたセット ot traget に対して評価を実行する
PS:> Get-SqlInstance -ServerInstance . | Where { $_.Name -Match '.*\d+' } | Invoke-SqlAssessment
TargetPath : Server[@Name='LOCAL\INSTANCE1']
Sev. Message Check ID Origin
---- ------- -------- ------
Medi Product version 14.0.1000 is not the latest available. Keep your LatestCU Microsoft Ruleset 0.1.202
your SQL Server up to date and install Service Packs and
Cumulative Updates as they are released.
...
この例では、パイプラインを介して一連のSQL Server インスタンスを受け入れる Invoke-SqlAssessment コマンドレットを示します。 セットは、標準の PowerShell Where-Object コマンドレットでフィルター処理されます。
例 7: 名前でデータベースの評価を呼び出す
PS:> Get-SqlDatabase master -ServerInstance localhost | Invoke-SqlAssessment -Verbose
VERBOSE: Base ruleset version: 0.2.
VERBOSE: No recommendations for [master].
この例では、データベースの名前を受け入れる Invoke-SqlAssessment コマンドレットを示します。 この場合、問題は見つかりませんでした。
例 8: パスによってデータベースの評価を呼び出す
PS:> Invoke-SqlAssessment SQLSERVER:\SQL\localhost\default\Databases\master -Verbose
VERBOSE: Base ruleset version: 0.2.
VERBOSE: No recommendations for [master].
この例では、SQL Server データベースへのパスを受け入れる Invoke-SqlAssessment コマンドレットを示します。
例 9: データベースの高い問題を検出する
PS:> cd SQLSERVER:\SQL\localhost\default\Databases\master
PS:> Invoke-SqlAssessment -MinSeverity High
VERBOSE: Base ruleset version: 0.2.
VERBOSE: No recommendations for [master].
この例では、現在の場所を評価する Invoke-SqlAssessment コマンドレットを示します。 高い問題のみが報告されます。
例 10: タグによって選択されたチェックを実行する
PS:> Get-SqlInstance -ServerInstance . | Invoke-SqlAssessment -Check Backup -Verbose
VERBOSE: Base ruleset version: 0.2.
VERBOSE: No recommendations for [LOCAL].
この例では、ローカル サーバー上のすべてのSQL Server インスタンスに対してバックアップ関連のすべてのチェックを実行する Invoke-SqlAssessment コマンドレットを示します。
例 11: 対話的に選択したチェックを実行する
PS:> $serverInstance = Get-SqlInstance -ServerInstance '(local)'
PS:> $checks = Get-SqlAssessmentItem $serverInstance | Select Name, Description | Out-GridView -PassThru
PS:> Invoke-SqlAssessment $serverInstance -Check $checks
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
この例の 2 行目は、$serverInstanceのチェックを取得し、その一部を対話的に選択する方法を示しています。 選択した項目は配列変数に格納され、 Invoke-SqlAssessment コマンドレットの入力として使用されます。 選択したチェックのみが評価プロセス中に実行されます。
例 12: -FlattenOutput パラメーターの効果
PS> $inst = Get-SqlInstance -ServerInstance .
PS> Invoke-SqlAssessment $inst -FlattenOutput | Select -First 1 | Get-Member
TypeName: Microsoft.SqlServer.Management.Assessment.Cmdlets.AssessmentNoteFlat
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
CheckId Property string CheckId {get;}
CheckName Property string CheckName {get;}
HelpLink Property string HelpLink {get;}
Message Property string Message {get;}
RulesetName Property string RulesetName {get;}
RulesetVersion Property string RulesetVersion {get;}
Severity Property string Severity {get;}
TargetPath Property string TargetPath {get;}
TargetType Property string TargetType {get;}
PS> Invoke-SqlAssessment $inst | Select -First 1 | Get-Member
TypeName: Microsoft.SqlServer.Management.Assessment.Cmdlets.AssessmentNote
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Check Property Microsoft.SqlServer.Management.Assessment.Checks.ICheck Check {get;}
HelpLink Property string HelpLink {get;}
Message Property string Message {get;}
Severity Property Microsoft.SqlServer.Management.Assessment.SeverityLevel Severity {get;}
TargetPath Property string TargetPath {get;}
TargetType Property string TargetType {get;}
PS> (Invoke-SqlAssessment $inst | Select -First 1).Check | Get-Member
TypeName: Microsoft.SqlServer.Management.Assessment.Checks.Check
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Condition Property Microsoft.SqlServer.Management.Assessment....
Description Property string Description {get;set;}
DisplayName Property string DisplayName {get;set;}
Enabled Property bool Enabled {get;set;}
HelpLink Property string HelpLink {get;set;}
Id Property string Id {get;set;}
Level Property Microsoft.SqlServer.Management.Assessment....
Message Property string Message {get;set;}
OriginName Property string OriginName {get;set;}
OriginVersion Property version OriginVersion {get;set;}
Parameters Property System.Collections.Generic.IDictionary[str...
Probes Property System.Collections.Generic.List[Microsoft....
Tags Property System.Collections.Generic.HashSet[string]...
Target Property Microsoft.SqlServer.Management.Assessment....
この例では、-FlattenOutput パラメーターの有無にかかわらず返されるオブジェクトの違いを示します。 パラメーターは、巨大な複雑な Check オブジェクトを、2 つの文字列プロパティ CheckId と CheckName に置き換えます。 これは、シリアル化の目的で役立ちます (次の例を参照してください)。
最初のコマンドは、string 型のすべてのプロパティを持つ単純な オブジェクトを示しています。
2 番目のコマンドは、2 つの文字列以外のプロパティを持つ別のオブジェクトを示しています: Check と Severity。
3 番目のコマンドは、Check プロパティを使用してアクセスできる豊富なデータ セットを示しています。
例 13: 失敗したチェックをもう一度実行する
PS> $inst = Get-SqlInstance -ServerInstance .
PS> $results = Invoke-SqlAssessment $inst
PS> $results
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
PS> $results[1].Check.Description
This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be
removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.
PS> Invoke-SqlAssessment $inst -Check $results[1].Check
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
PS> Invoke-SqlAssessment $inst -Check ($results).Check
TargetPath : Server[@Name='LOCAL']
Sev. Message Check ID Origin
---- ------- -------- ------
Info Enable trace flag 834 to use large-page allocations to improve TF834 Microsoft Ruleset 0.1.202
analytical and data warehousing workloads.
Low Detected deprecated or discontinued feature uses: String literals DeprecatedFeatures Microsoft Ruleset 0.1.202
as column aliases, syscolumns, sysusers, SET FMTONLY ON, XP_API,
Table hint without WITH, More than two-part column name. We
recommend to replace them with features actual for SQL Server
version 14.0.1000.
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources.
この例では、評価結果で返されたチェックを再利用する方法を示します。 前に AssessmentNotes を生成したチェックを再実行できます。
例 14: 評価結果をテーブルに格納する
PS:> $serverInstance = Get-SqlInstance -ServerInstance '(local)'
PS:> Invoke-SqlAssessment $serverInstance -FlattenOutput |
Write-SqlTableData -ServerInstance localhost -DatabaseName SqlAssessment -SchemaName Assessment -TableName Results -Force
この例の 2 行目は、-FlattenOutput パラメーターと Write-SqlTableData コマンドレットを使用して、評価結果を SQL データベースに格納する方法を示しています。
例 15: 資格情報を明示的に指定する
PS> $cred = Get-Credential
PowerShell credential request
Enter your credentials.
User: Administrator
Password for user Administrator: ********
PS> $inst = Get-SqlInstance -ServerInstance 10.0.3.118 -Credential $cred
PS> Invoke-SqlAssessment $inst
TargetPath : Server[@Name='ContosSQL']
Sev. Message Check ID Origin
---- ------- -------- ------
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources
この例では、明示的に指定された資格情報を使用して SQL Assessment を呼び出す方法を示します。
例 16: Azure VM インスタンスでSQL Serverの評価を呼び出す
PS> Connect-AzAccount
PS> Set-Subscription My-Pay-As-You-Go
PS> $cred = Get-Credential
PowerShell credential request
Enter your credentials.
User: Administrator
Password for user Administrator: ********
PS> $inst = Get-SqlInstance -ServerInstance 10.0.3.118 -Credential $cred
PS> Invoke-SqlAssessment $inst
TargetPath : Server[@Name='ContosoAzureSQL']
Sev. Message Check ID Origin
---- ------- -------- ------
Medi Amount of single use plans in cache is high (100%). Consider PlansUseRatio Microsoft Ruleset 0.1.202
enabling the Optimize for ad hoc workloads setting on heavy OLTP
ad-hoc workloads to conserve resources
Info Use memory optimized virtual machine sizes for the best AzSqlVmSize Microsoft Ruleset 0.1.202
performance of SQL Server workloads
この例では、Azure VM インスタンスでSQL Serverの評価を呼び出す方法を示します。
アクティブな Azure サブスクリプション接続を使用すると、Azure VM に関連するチェック (この例では AzSqlVmSize) でSQL Serverできます。 最初の行は、Azure アカウントに接続して、Azure Resource Graphからデータを取得します。 2 行目は省略可能です。
これらのチェックを実行するには、SQL Assessment に Az.ResourceGraph モジュールが必要です。
パラメーター
-Check
1 つ以上のチェック、チェック ID、またはタグ。
チェックオブジェクトごとに、Invoke-SqlAssessment は入力オブジェクトをサポートしている場合にチェックを実行します。
Invoke-SqlAssessment は、チェック ID ごとに、対応するチェックを実行します (入力オブジェクトがサポートされている場合)。
タグの場合、 Invoke-SqlAssessment は、これらのタグのいずれかでチェックを実行します。
Type: | Object[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Configuration
カスタム構成を含むファイルへのパスを指定します。 カスタマイズ ファイルは、指定した順序で既定の構成に適用されます。 スコープは、このコマンドレットの呼び出しのみに制限されます。
Type: | PSObject |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FlattenOutput
このコマンドレットによって、Microsoft.SqlServer.Management.Assessment.Cmdlets.AssessmentNote ではなく、Microsoft.SqlServer.Management.Assessment.Cmdlets.AssessmentNoteFlat 型の単純なオブジェクトが生成されることを示します。
Invoke-SqlAssessmentから返される Regular AssessmentNote には、Check などの他の便利な複合オブジェクトへの参照が含まれています (例 12 を参照)。 Check プロパティを使用すると、チェックの説明を取得したり、チェックを再利用したりできます (例 13 を参照)。 ただし、一部のコマンドレットでは複雑なプロパティがサポートされていません。 たとえば、assessmentNote をデータベースに書き込もうとすると、Write-SqlTableDataでエラーが発生します。 これを回避するには、-FlattenOutput パラメーターを使用して、Check プロパティを CheckId と CheckName の 2 つの単純な文字列に置き換えます (例 14 を参照)。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
SQL Server オブジェクトまたはそのようなオブジェクトへのパスを指定します。 コマンドレットは、このオブジェクトの評価を実行します。 このパラメーターを省略すると、現在の位置が入力オブジェクトとして使用されます。 現在の場所がサポートされているSQL Server オブジェクトでない場合、コマンドレットはエラーを通知します。
Type: | PSObject |
Aliases: | Target |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MinSeverity
チェックの最小重大度レベルを指定します。 たとえば、-MinSeverity High の場合、Low、Medium、Information の各レベルのチェックは返されません。
Type: | SeverityLevel |
Aliases: | Severity |
Accepted values: | Information, Low, Medium, High |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
System.String[]
Microsoft.SqlServer.Management.Smo.SqlSmoObject[]
出力
Microsoft.SqlServer.Assessment.Cmdlets.AssessmentNote