I get
Jobs not found 'NP_SQL_HA_RPO24H_30'
Getting SQL protection run status...
It's able to use the variable from what I can tell because 'NP_SQL_HA_RPO24H_30' is the name of the Protection Group I'm running the script against but just not able to complete due to the error
Are there any adjustments I can make to the script? I don't want you to change your script by any means on github.
Just looking for maybe a modification I need to do on my side to use the environment variables.
I tried changing to a parameter of [string] and that didn't help
Example:
[Parameter()][string]$jobName = $env:COHESITY_JOB_NAME,
I have been using aagFailoverMinder.ps1
in our Protection Jobs as a Post Script so it can perform the INC backup on errors that occur.
It works great if I pass the
-jobName 'ProctectionGroupName'
or even put it in the script itself like
[Parameter()][array]$jobName = 'ProctionGroupName'
Successful Result: Connected! Getting SQL protection run status... NP_SQL_HA_RPO24H_30
however when I try and use the environment variable that the Protection job creates at each run Example: -jobName $env:COHESITY_JOB_NAME
or even put it in the script itself like
[Parameter()][array]$jobName = $env:COHESITY_JOB_NAME,
I get Jobs not found 'NP_SQL_HA_RPO24H_30' Getting SQL protection run status...
It's able to use the variable from what I can tell because 'NP_SQL_HA_RPO24H_30' is the name of the Protection Group I'm running the script against but just not able to complete due to the error
Are there any adjustments I can make to the script? I don't want you to change your script by any means on github. Just looking for maybe a modification I need to do on my side to use the environment variables. I tried changing to a parameter of [string] and that didn't help Example: [Parameter()][string]$jobName = $env:COHESITY_JOB_NAME,