< Back

Get-DbsStig

Mon Jan 13, 2020 9:05 am

NAME Get-DbsStig



SYNOPSIS

Parses the U_MS_SQL_Server_2014_Database_STIG_V1R6_Manual-xccdf style XML files from DISA into PowerShell objects





SYNTAX

Get-DbsStig [[-Path] <Object[]>] [[-Version] <Int32[]>] [-EnableException] [<CommonParameters>]





DESCRIPTION

Parses the U_MS_SQL_Server_2014_Database_STIG_V1R6_Manual-xccdf style XML files from DISA into PowerShell objects





PARAMETERS

-Path <Object[]>

The Path to the STIG xml file. Not required, as they've been included.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Version <Int32[]>

By default, SQL Server 2014 and above stigs are returned. This allows you to filter by version.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EnableException [<SwitchParameter>]

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.

This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables

advanced scripting.

Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own

try/catch.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-DbsStig



Return checklsits for database and instance for SQL Server 2014 and 2016









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-DbsStig -Version 2014



Return checklsits for database and instance for SQL Server 2014 only











RELATED LINKS