< Back
Get-DbaFeature
Post
NAME Get-DbaFeature
SYNOPSIS
Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)
SYNTAX
Get-DbaFeature [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>] [[-Credential]
<Pscredential>] [-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)
Inspired by Dave Mason's (@BeginTry) post at
https://itsalljustelectrons.blogspot.be ... eport.html
Assumptions:
1. The sub-folder "Microsoft SQL Server" exists in [System.Environment]::GetFolderPath("ProgramFiles"),
even if SQL was installed to a non-default path. This has been
verified on SQL 2008R2 and SQL 2012. Further verification may be needed.
2. The discovery report displays installed components for the version of SQL
Server associated with setup.exe, along with installed components of all
lesser versions of SQL Server that are installed.
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
The target computer. If the target is not localhost, it must have PowerShell remoting enabled.
Note that this is not the SqlInstance, but rather the ComputerName
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Allows you to login to servers using alternative credentials. To use:
$cred = Get-Credential, then pass $cred object to the -Credential parameter.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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
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
NOTES
Tags: Feature, Component
Author: Chrissy LeMaire (@cl), netnerds.net
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-DbaFeature -ComputerName sql2017, sql2016, sql2005
Gets all SQL Server features for all instances on sql2017, sql2016 and sql2005.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DbaFeature -Verbose
Gets all SQL Server features for all instances on localhost. Outputs to screen if no instances are found.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-DbaFeature -ComputerName sql2017 -Credential ad\\sqldba
Gets all SQL Server features for all instances on sql2017 using the ad\\sqladmin credential (which has access to
the Windows Server).
RELATED LINKS
https://dbatools.io/Get-DbaFeature
SYNOPSIS
Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)
SYNTAX
Get-DbaFeature [[-ComputerName] <Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>] [[-Credential]
<Pscredential>] [-EnableException <Switch>] [<CommonParameters>]
DESCRIPTION
Runs the SQL Server feature discovery report (setup.exe /Action=RunDiscovery)
Inspired by Dave Mason's (@BeginTry) post at
https://itsalljustelectrons.blogspot.be ... eport.html
Assumptions:
1. The sub-folder "Microsoft SQL Server" exists in [System.Environment]::GetFolderPath("ProgramFiles"),
even if SQL was installed to a non-default path. This has been
verified on SQL 2008R2 and SQL 2012. Further verification may be needed.
2. The discovery report displays installed components for the version of SQL
Server associated with setup.exe, along with installed components of all
lesser versions of SQL Server that are installed.
PARAMETERS
-ComputerName [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]
The target computer. If the target is not localhost, it must have PowerShell remoting enabled.
Note that this is not the SqlInstance, but rather the ComputerName
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Credential [<Pscredential>]
Allows you to login to servers using alternative credentials. To use:
$cred = Get-Credential, then pass $cred object to the -Credential parameter.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-EnableException [<Switch>]
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
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
NOTES
Tags: Feature, Component
Author: Chrissy LeMaire (@cl), netnerds.net
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-DbaFeature -ComputerName sql2017, sql2016, sql2005
Gets all SQL Server features for all instances on sql2017, sql2016 and sql2005.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-DbaFeature -Verbose
Gets all SQL Server features for all instances on localhost. Outputs to screen if no instances are found.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-DbaFeature -ComputerName sql2017 -Credential ad\\sqldba
Gets all SQL Server features for all instances on sql2017 using the ad\\sqladmin credential (which has access to
the Windows Server).
RELATED LINKS
https://dbatools.io/Get-DbaFeature