Release
This commit is contained in:
@@ -5,8 +5,11 @@
|
|||||||
#
|
#
|
||||||
# Must be run with a Global service account.
|
# Must be run with a Global service account.
|
||||||
#
|
#
|
||||||
# Requires RubrikSecurityCloud module to be installed and working against
|
# Requires RubrikSecurityCloud module to be installed and working with
|
||||||
# a Global Service Account with Administrator rights.
|
# a Global Service Account with the following rights:
|
||||||
|
#
|
||||||
|
# - Data Management / Oracle / On-Demand Snapshot
|
||||||
|
# - Data Management / SLAs / Both Source and Target SLAs
|
||||||
#
|
#
|
||||||
# Create the service account file with:
|
# Create the service account file with:
|
||||||
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
|
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
|
||||||
@@ -32,7 +35,8 @@ param (
|
|||||||
[switch]$dryrun
|
[switch]$dryrun
|
||||||
)
|
)
|
||||||
|
|
||||||
$GlobalSAFile = "C:\Rubrik\james.xml"
|
# SA File must be an absolute path
|
||||||
|
$GlobalSAFile = "C:\Rubrik\rscSa.xml"
|
||||||
$logFile = "C:\Rubrik\monthlySnap.log"
|
$logFile = "C:\Rubrik\monthlySnap.log"
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
@@ -94,7 +98,11 @@ if ($dryrun) {
|
|||||||
$query.Var.input.Config.baseOnDemandSnapshotConfig.slaId = $monthlySla.id
|
$query.Var.input.Config.baseOnDemandSnapshotConfig.slaId = $monthlySla.id
|
||||||
$query.Field = Get-RscType -Name AsyncRequestStatus -InitialProperties id
|
$query.Field = Get-RscType -Name AsyncRequestStatus -InitialProperties id
|
||||||
$result = $query.Invoke()
|
$result = $query.Invoke()
|
||||||
Write-Log "Backup triggered for Name: $($_.Name), Id: $result.Id"
|
if ($result -and $result.Id) {
|
||||||
|
Write-Log "Backup triggered for Name: $($_.Name), Job ID: $($result.Id)"
|
||||||
|
} else {
|
||||||
|
Write-Log "Backup triggered for Name: $($_.Name), but no Job ID returned."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user