viverm
viverm
@dragonfly91 do you know why we have cmdlet SetAzureRmRecoveryServicesVaultContext and SetAzureRmRecoveryServicesBackupProperties in recoveryservices module. In ASR we are not using them , if it is not needed in backup we...
$SelectedRecoveryVault = Get-AzRecoveryServicesVault -ResourceGroupName myresourcegroup Set-ASRVaultContext -Vault $SelectedRecoveryVault -ErrorAction Stop $StorageAccountID = Get-AzStorageAccount -Name mystorageaccount -ResourceGroupName myresourcegroup | Select -ExpandProperty Id https://docs.microsoft.com/en-us/powershell/module/AzureRM.RecoveryServices.SiteRecovery/New-AzureRmRecoveryServicesAsrPolicy?view=azurermps-6.13.0 $currentJob = New-AzRecoveryServicesAsrPolicy -Name $ProtectionProfileName -ReplicationProvider HyperVReplicaAzure -ReplicationFrequencyInSeconds...
@shubhamgupta514 Method ASR-EnableReplicationAPI used in script is not present in zip . [Try adding agent-authentication in header](https://social.msdn.microsoft.com/Forums/en-US/1389eb33-611d-4dd2-893c-de6168f79c32/resful-api-add-vcenter-to-configuration-fail-with-error-code-31255-the-same-action-is-working-fine?forum=hypervrecovmgr)
@shubhamgupta514 Can you tell Module version of Get-AzureRmSiteRecoveryVaultSettings and Set-ASRVaultContext `get-command Get-AzureRmSiteRecoveryVaultSettings` `get-command Set-ASRVaultContext`
@shubhamgupta514 Thanks for Update.
hi @shubhamgupta514 in the attached txt file I am seeing two function `ARM-VMInfoAPI` and `RESTAPI-Auth` looks like `ASR-EnableReplicationAPI` is not present in file. Can you please add that method too...
@shubhamgupta514 any update on this ?
Use javascript serializer ``` [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer $shaInput = $ser.serialize($global:cikTokenDetails) $hmacsha = New-Object System.Security.Cryptography.HMACSHA256 $hmacsha.key = [Text.Encoding]::UTF8.GetBytes($integrityKey) $global:cikTokenDetails.Hmac = [Convert]::ToBase64String($hmacsha.ComputeHash([Text.Encoding]::UTF8.GetBytes($shaInput))) $global:cikTokenDetails.HashFunction = "HMACSHA256" ```
@shubhamgupta514 we have added support for VMware to Azure Site recovery from powershell . You can use those cmdlet directly .
@shubhamgupta514 I tried some dry on run code added . It is working fine for me . It just need more investigation what is going wrong. Powershell code is available...