May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,37 @@
Param(
[parameter(Mandatory=$true)]
[ValidateSet('CH','PL','SE','NL','DK','NO','DE')]
[String] $envCountry
)
try{
Set-DbatoolsInsecureConnection -SessionOnly
. .\..\.env\dbadmin.ps1
if($envCountry -eq 'CH'){
Write-Output "Loading Switzerland Environment Settings"
. .\..\.env\Import-envCH.ps1
$country = 'Switzerland'
}
if($envCountry -eq 'SE'){
Write-Output "Loading Swidish Environment Settings"
. .\.env\Import-envSE.ps1
$country = 'Sweden'
}
if($envCountry -eq 'PL'){
Write-Output "Loading Swidish Environment Settings"
. .\.env\Import-envPL.ps1
$country = 'Poland'
}
if($envCountry -eq 'NO'){
Write-Output "Loading Swidish Environment Settings"
. .\.env\Import-envNO.ps1
$country = 'Norway'
}
if($envCountry -eq 'DE'){
Write-Output "Loading Germany Environment Settings"
. .\.env\Import-envDE.ps1
$country = 'Germany'
}
}
catch{
Write-Error $_
}
@@ -0,0 +1,39 @@
$envCountry = 'CH'
#identity to connect to environment
$DBActiveDirectoryDomain= '%doimain name%'
$DBADAccount='%username'
$DBAsvcPassword = ConvertTo-SecureString -String '%password ' -AsPlainText -Force
$DBACredential = New-Object System.Management.Automation.PSCredential("$DBActiveDirectoryDomain\$DBADAccount", $DBAsvcPassword)
$linPassword = ConvertTo-SecureString -String '1' -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $linAccount, $linPassword
# Instances list
$servers = @(
# Green - test environement
@("tpiccard","10.146.11.71","tpiccard","green"),
@("bisw12ponldb01","10.41.70.65","bisw12ponldb01","green"),
@("CHREPRTDB1NPW01","10.213.64.25","CHREPRTDB1NPW01","blue"),
#dev @("BISW19TSQLCLU2","10.41.70.238","BISW19TSQLCLU2","green"),
#dev @("BISW19TSQLCLU1","10.213.64.130","BISW19TSQLCLU1","green"),
#wait for install SQL@("CHSHAB0DB0PRW01","10.41.70.230","CHSHAB0DB0PRW01","green"),
# @("BISW19TMast1","10.213.64.132","BISW19TMast1","green"),brak sql
# @("BISW19TMIGR01","10.41.70.122","BISW19TMIGR01","green"),brak sql
#decommisioned @("BISW19TTRADE01","10.213.2.200","BISW19TTRADE01","green"),
@("CHLOOKUDB0PRW01","10.146.11.11","CHLOOKUDB0PRW01","green"),
# Orange - production environement
@("CHREPRTDB1PRW01","10.213.2.81","CHREPRTDB1PRW01","orange"),
@("BISW12PSQLWC01","10.41.70.205","BISW12PSQLWC01","orange"),
@("BISW12PMISDB01.bisnodech.local","10.41.70.32","BISW12PMISDB01","orange"),
@("BISW19PNAVDB01.bisnodech.local","10.146.11.103","BISW19PNAVDB01,","orange")
@("CHURSHAB.bisnodech.local","10.146.11.60","CHURSHAB","orange"),
@("bisw12pbccdb01.bisnodech.local","10.41.70.38","bisw12pbccdb01","orange"),
@("bisw12ponldb01.bisnodech.local","10.41.70.65","bisw12ponldb01","orange"),
@("bisw12prpsdb01.bisnodech.local","10.146.11.158","bisw12prpsdb01","orange"),
@("bisw12psqldb01.bisnodech.local","10.146.11.248","bisw12psqldb01","orange"),
@("bisw12psqldb02.bisnodech.local","10.146.11.190","bisw12psqldb02","orange"),
@("bisw12pxmldb01.bisnodech.local","10.146.11.194","bisw12pxmldb01","orange"),
@("dnbw08plookup1.dnb.bisnodech.local ","10.146.11.11","bisw12pxmldb01","orange"),
@("piccard.dnbswitzerland.ch","10.146.11.213","piccard","orange")
)
@@ -0,0 +1,5 @@
$ActiveDirectoryDomain= '%domain name%'
$ADAccount='%username%'
$svcPassword = ConvertTo-SecureString -String '%password to DBAmin instance%' -AsPlainText -Force #Muszę to zmienić ponieważ nie jest bezpiecznie trzymać te informacje w pliku płaskim
$ADCredential = New-Object System.Management.Automation.PSCredential("$ActiveDirectoryDomain\$ADAccount", $svcPassword)