This commit is contained in:
2025-09-24 15:01:42 +01:00
parent 0b69876b40
commit 4182f24f3d
2 changed files with 6 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
# a Global Service Account with the following rights (TBC)
#
# Create the service account file with:
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
# Set-RscServiceAccountFile sa.json -OutputFilePath sa-rbksql.xml
#
# Example invocation
# .\claimInstance.ps1 -sqlInstance "sqlfcsql\TESTINST" -mvName "JP-ZF-SQL"
@@ -29,7 +29,7 @@ param (
)
# SA File must be an absolute path
$GlobalSAFile = "C:\Rubrik\scripts\sa.xml"
$SAFile = "C:\Rubrik\scripts\sa-rbksql.xml"
$logFile = "C:\Rubrik\scripts\claimInstance.log"
$mvName = "JP-ZF-SQL"
$sqlInstance = "sqlfcsql\TESTINST"
@@ -61,7 +61,7 @@ if ($checkCluster) {
if ($ownerNode -ne $localNode) {
Write-Log "SQL instance '$sqlInstance' is not running on local node '$localNode'. Updating the MV."
Connect-Rsc -ServiceAccountFile $GlobalSAFile
Connect-Rsc -ServiceAccountFile $SAFile
Write-Log "Connected to Rubrik Security Cloud."
$newHost = Get-RscHost -Name $ownerNode -OsType WINDOWS
@@ -118,4 +118,3 @@ if ($checkCluster) {
Write-Log "INFO: Cluster check is disabled. Proceeding without verification."
}
Disconnect-Rsc