Iam trying to copy blobs created in last 24 hours from one storage account to another storage account which are in different subscriptions using powershell. I wanted to automate this using Azure automation but facing issue while selecting the Subscription context. It allows me to select only one subscription context at any time and since the 'copy' points to different subscriptions, the script is failing. Any input is highly appreciated, below is my script.

```

Select-AzSubscription -SubscriptionId $AzureSubscriptionId1

# Get Source Storage Account

$SrcStorage = Get-AzStorageAccount -name $SrcStorageAccountName -ResourceGroupName $SrcStorageAccountRG

Select-AzSubscription -SubscriptionId $AzureSubscriptionId2

# Get Target Storage Account
$TgtStorage = Get-AzStorageAccount -name $TgtStorageAccountName -ResourceGroupName $TgtStorageAccountRG

$Days = 1

Get-AzureStorageBlob -Container $SrcStorageContainerName -Context $SrcStorage.Context | Where-Object { $_.LastModified.DateTime -gt ((Get-Date).AddDays(-$Days)) } |  Start-AzureStorageBlobCopy -DestContainer $TgtStorageContainerName -DestContext $TgtStorage.Context

```