<commit_before>﻿<#
    .SYNOPSIS
       Add a synopsis here to explain the PSScript. 

    .Description
        Give a description of the Script.

#>
Param(

)
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
$CompletedParameters = Write-StartingMessage -CommandName Invoke-VirtualMachineClone
    
$PrimaryAzureSubscriptionVars = Get-BatchAutomationVariable -Prefix 'AzureSubscription' `
                                                            -Name 'Name',
                                                                  'AccessCredentialName',
                                                                  'Tenant'

$BackupAzureSubscriptionVars = Get-BatchAutomationVariable -Prefix 'BackupAzureSubscription' `
                                                           -Name 'Name',
                                                                 'AccessCredentialName',
                                                                 'Tenant'

$CloneVars = Get-BatchAutomationVariable -Prefix 'VirtualMachineClone' `
                                         -Name 'ResourceGroup', 
                                               'TargetStorageAccountName',
                                               'SourceStorageAccountName'

$PrimarySubscriptionAccessCredential = Get-AutomationPSCredential -Name $PrimaryAzureSubscriptionVars.AccessCredentialName
$BackupSubscriptionAccessCredential = Get-AutomationPSCredential -Name $BackupAzureSubscriptionVars.AccessCredentialName

Try
{
    Copy-AzureRMResourceGroupVMDisk -SourceSubscriptionName $PrimaryAzureSubscriptionVars.Name `
                                    -SourceSubscriptionAccessCredential $PrimarySubscriptionAccessCredential `
                                    -SourceSubscriptionTenant $PrimaryAzureSubscriptionVars.Tenant `
                                    -TargetSubscriptionName $BackupAzureSubscriptionVars.Name `
                                    -TargetSubscriptionAccessCredential $BackupSubscriptionAccessCredential `
                                    -TargetSubscriptionTenant $BackupAzureSubscriptionVars.Tenant `
                                    -SourceResourceGroupName $CloneVars.ResourceGroup `
                                    -TargetResourceGroupName $CloneVars.ResourceGroup `
                                    -TargetStorageAccountName $CloneVars.TargetStorageAccountName `
                                    -SourceStorageAccountName $CloneVars.SourceStorageAccountName
}
Catch
{
    $Exception = $_
    $ExceptionInfo = Get-ExceptionInfo -Exception $Exception
    Switch ($ExceptionInfo.FullyQualifiedErrorId)
    {
        Default
        {
            Write-Exception $Exception -Stream Warning
        }
    }
}<commit_msg>add hello world<commit_after>﻿<#
    .SYNOPSIS
       Add a synopsis here to explain the PSScript. 

    .Description
        Give a description of the Script.

#>
Param(

)
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
$CompletedParameters = Write-StartingMessage -CommandName Invoke-VirtualMachineClone
    
$PrimaryAzureSubscriptionVars = Get-BatchAutomationVariable -Prefix 'AzureSubscription' `
                                                            -Name 'Name',
                                                                  'AccessCredentialName',
                                                                  'Tenant'

$BackupAzureSubscriptionVars = Get-BatchAutomationVariable -Prefix 'BackupAzureSubscription' `
                                                           -Name 'Name',
                                                                 'AccessCredentialName',
                                                                 'Tenant'

$CloneVars = Get-BatchAutomationVariable -Prefix 'VirtualMachineClone' `
                                         -Name 'ResourceGroup', 
                                               'TargetStorageAccountName',
                                               'SourceStorageAccountName'

$PrimarySubscriptionAccessCredential = Get-AutomationPSCredential -Name $PrimaryAzureSubscriptionVars.AccessCredentialName
$BackupSubscriptionAccessCredential = Get-AutomationPSCredential -Name $BackupAzureSubscriptionVars.AccessCredentialName

Try
{
    Write-Verbose -Message 'hello world'
    Copy-AzureRMResourceGroupVMDisk -SourceSubscriptionName $PrimaryAzureSubscriptionVars.Name `
                                    -SourceSubscriptionAccessCredential $PrimarySubscriptionAccessCredential `
                                    -SourceSubscriptionTenant $PrimaryAzureSubscriptionVars.Tenant `
                                    -TargetSubscriptionName $BackupAzureSubscriptionVars.Name `
                                    -TargetSubscriptionAccessCredential $BackupSubscriptionAccessCredential `
                                    -TargetSubscriptionTenant $BackupAzureSubscriptionVars.Tenant `
                                    -SourceResourceGroupName $CloneVars.ResourceGroup `
                                    -TargetResourceGroupName $CloneVars.ResourceGroup `
                                    -TargetStorageAccountName $CloneVars.TargetStorageAccountName `
                                    -SourceStorageAccountName $CloneVars.SourceStorageAccountName
}
Catch
{
    $Exception = $_
    $ExceptionInfo = Get-ExceptionInfo -Exception $Exception
    Switch ($ExceptionInfo.FullyQualifiedErrorId)
    {
        Default
        {
            Write-Exception $Exception -Stream Warning
        }
    }
}
{'fraction_non_alphanumeric': 0.05397676496872207, 'fraction_numerical': 0.0, 'mean_word_length': 1.5105428443248092, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5522594', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1124, 'n_words': 188}