-
Notifications
You must be signed in to change notification settings - Fork 0
/
Demo5b.ps1
51 lines (29 loc) · 1.11 KB
/
Demo5b.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
45
46
47
48
49
50
51
Clear-Host
. (Join-Path $PSScriptRoot "funktioner.ps1")
$Env = Read-Host -Prompt 'Hvilket miljø skal der deployes til?'
$Settings = Get-Content $(Join-Path $PSScriptRoot "$Env.settings") | Out-String | ConvertFrom-Json
Write-Host "Settings used:"
$Settings
$SqlServerName = $Settings.SqlServerName
$SsasServerName = $Settings.SsasServerName
$DatabaseName = $Settings.DatabaseName
$FolderName = $Settings.FolderName
$Path = $Settings.Path
#######################################################
Write-Host "SQL:"
$files = Get-ChildItem $Path -Filter *.txt
ForEach ($InputFile in $files) {
Publish-SQL $SqlServerName $DatabaseName $InputFile
}
#######################################################
Write-Host "`nSSIS:"
$files = Get-ChildItem $Path -Filter *.ispac
ForEach ($InputFile in $files) {
Publish-SSIS $SqlServerName $FolderName $InputFile
}
#######################################################
Write-Host "`nSSAS:"
$files = Get-ChildItem $Path -Filter *.asdatabase
ForEach ($InputFile in $files) {
Publish-SSAS $SsasServerName $InputFile
}