-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy pathSQLInstallDSC.ps1
44 lines (36 loc) · 1.23 KB
/
SQLInstallDSC.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Configuration SQLServer{
param([string[]] $ComputerName)
Import-DscResource -Module cSQLResources
Node $ComputerName {
File DataDir{
DestinationPath = 'C:\DBFiles\Data'
Type = 'Directory'
Ensure = 'Present'
}
File LogDir{
DestinationPath = 'C:\DBFiles\Log'
Type = 'Directory'
Ensure = 'Present'
}
File TempDBDir{
DestinationPath = 'C:\DBFiles\TempDB'
Type = 'Directory'
Ensure = 'Present'
}
WindowsFeature NETCore{
Name = 'NET-Framework-Core'
Ensure = 'Present'
IncludeAllSubFeature = $true
Source = 'D:\sources\sxs'
}
cSQLInstall SQLInstall{
InstanceName = 'DUMMY'
InstallPath = '\\HIKARU\InstallFiles\SQL2014'
ConfigPath = '\\HIKARU\InstallFiles\SQL2014\SQL2014_Core_DSC.ini'
UpdateEnabled = $true
UpdatePath = '\\HIKARU\InstallFiles\SQL2014\Updates'
DependsOn = @("[File]DataDir","[File]LogDir","[File]TempDBDir","[WindowsFeature]NETCore")
}
}
}
SQLServer -ComputerName MISA