I am trying to set up a script that will update Re-IP rules and Network Mapping of replica jobs. This is to allow us to switch them to an isolated network for testing and back again post testing. I am running into the same error for each command. The replica jobs target a cluster. When i switch them to target a host instead then the script appears to work successfully. Is it possible to target a cluster when performing these commands?
Confirmed as a bug. Can't promise that we will manage to fix it before v12 release though.
Just so you know if the fix won't make it to the release, in the latest v12 beta the behavior is the same, but the exception thrown is different.
Was able to test this today successfully on V12 however when MFA is enabled it won't work. I saw mention of improvements in MFA with Powershell in the initial 12.1 announcements. Will it be possible to run pre/post failover scripts when MFA is enabled in that release?
You cannot use VBR powershell module under MFA-enabled account. Nor will you be able to in v12.1. If MFA is enabled for VBR, use service accounts to connect to VBR with Powershell as described here. Thanks!
Thanks Oleg, for a planned failover there is an option to run scripts pre and post failover however i didn't see an option to run these scripts under a different account. How would you go about running these planned failover scripts in this scenario?
There is no option to run pre/post-failover scripts under a different account because they are being ran under the currently authenticated account on a backup server. Hence, it depends on how you trigger a failover plan: if through UI - then scripts are ran under the MFA-enabled account that has already logged in, if through Powershell - you'd have to authenticate with a service account (MFA-disabled), the scripts will be ran under it. Hope it helps!