Skip to content

Commit 28d7ecf

Browse files
committed
SqlInstall: New resource
1 parent 2ea2c07 commit 28d7ecf

File tree

4 files changed

+875
-2
lines changed

4 files changed

+875
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Added
1515

1616
- SqlServerDsc
17+
- New class-based resource:
18+
- `SqlInstal` - Handles the Microsoft SQL Server setup action `Install`.
1719
- New public command:
1820
- `Disconnect-SqlDscDatabaseEngine` - Disconnects from a SQL Server instance
1921
that was previously connected to using `Connect-SqlDscDatabaseEngine`.

source/Classes/011.SqlResourceBase.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#
22
.SYNOPSIS
3-
The SqlResource base have generic properties and methods for the class-based
4-
resources.
3+
The SqlResourceBase have generic properties and methods that are common for
4+
all the class-based resources.
55
66
.PARAMETER InstanceName
77
The name of the _SQL Server_ instance to be configured. Default value is

source/Classes/015.SqlSetupBase.ps1

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<#
2+
.SYNOPSIS
3+
The SqlSetupBase have generic properties and methods that are common for
4+
the setup action class-based resources.
5+
6+
.PARAMETER MediaPath
7+
Specifies the path where to find the SQL Server installation media. On this
8+
path the SQL Server setup executable must be found.
9+
10+
.PARAMETER ConfigurationFile
11+
Specifies an configuration file to use during SQL Server setup. This
12+
parameter cannot be used together with any of the setup actions, but instead
13+
it is expected that the configuration file specifies what setup action to
14+
run.
15+
16+
.PARAMETER Timeout
17+
Specifies how long to wait for the setup process to finish. Uses the default
18+
value of the command `Install-SqlDscServer`. If the setup process does not
19+
finish before this time, an exception will be thrown.
20+
#>
21+
class SqlSetupBase : SqlResourceBase
22+
{
23+
[DscProperty(Mandatory)]
24+
[System.String]
25+
$MediaPath
26+
27+
[DscProperty()]
28+
[System.String]
29+
$ConfigurationFile
30+
31+
[DscProperty()]
32+
[System.UInt32]
33+
$Timeout
34+
}

0 commit comments

Comments
 (0)