Skip to content

Repair SqlDscServer

dscbot edited this page Mar 3, 2024 · 2 revisions

Repair-SqlDscServer

SYNOPSIS

Executes an setup action using Microsoft SQL Server setup executable.

SYNTAX

Repair-SqlDscServer [-MediaPath] <String> [-InstanceName] <String> [-Enu] [-Features] <String[]>
 [[-PBEngSvcAccount] <String>] [[-PBEngSvcPassword] <SecureString>] [[-PBEngSvcStartupType] <String>]
 [[-PBStartPortRange] <UInt16>] [[-PBEndPortRange] <UInt16>] [-PBScaleOut] [[-Timeout] <UInt32>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Executes an setup action using Microsoft SQL Server setup executable.

See the link in the commands help for information on each parameter. The link points to SQL Server command line setup documentation.

EXAMPLES

EXAMPLE 1

Repair-SqlDscServer -InstanceName 'MyInstance' -Features 'SQLENGINE' -MediaPath 'E:\'

Repairs the database engine of the instance 'MyInstance'.

PARAMETERS

-Enu

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Features

See the notes section for more information.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

If specified the command will not ask for confirmation. Same as if Confirm:$false is used.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-InstanceName

See the notes section for more information.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MediaPath

Specifies the path where to find the SQL Server installation media. On this path the SQL Server setup executable must be found.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEndPortRange

See the notes section for more information.

Type: UInt16
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcAccount

See the notes section for more information.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcPassword

See the notes section for more information.

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBEngSvcStartupType

See the notes section for more information.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PBScaleOut

See the notes section for more information.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PBStartPortRange

See the notes section for more information.

Type: UInt16
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Timeout

Specifies how long to wait for the setup process to finish. Default value is 7200 seconds (2 hours). If the setup process does not finish before this time, an exception will be thrown.

Type: UInt32
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: 7200
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

None.

NOTES

The parameters are intentionally not described since it would take a lot of effort to keep them up to date. Instead there is a link that points to the SQL Server command line setup documentation which will stay relevant.

RELATED LINKS

https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt

Home

Commands

Resources

Usage

Clone this wiki locally