Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: The 200 argument is greater than the maximum allowed range of 100 #81

Open
DamaniN opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@DamaniN
Copy link
Contributor

DamaniN commented Oct 11, 2024

The counter for Backup Plan Selections throws this error:

./rubrik/rubrik-sizing-scripts/CLOUD/Get-AWSSizingInfo.ps1 -OrgCrossAccountRoleName OrganizationAccountAccessRole -Regions "us-west-1,us-west-2,us-east-1,us-east-2" 

Transcript started, output file is ./output_aws_2024-10-09_202508.log Source Profile/Credential is: arn:aws:sts::XXXXXXXXXXXX:assumed-role/<redacted>/<redacted> Searching account id: XXXXXXXXXXXX account name: <redacted> 
Current identity: Account Arn UserId ------- --- ------ XXXXXXXXXXX arn:aws:sts::XXXXXXXXXXXX:<redacted>/OrganizationAccountAccessRole/Get-AWSSizingInfo.ps1 <redacted>:Get-AWSSizingInfo.ps1 
Write-Error: An error occurred and the script has exited prematurely: 
Write-Error: Cannot validate argument on parameter 'PercentComplete'. The 200 argument is greater than the maximum allowed range of 100. Supply an argument that is less than or equal to 100 and then try the command again. 
Write-Error: at getAWSData, /home/cloudshell-user/rubrik/rubrik-sizing-scripts/CLOUD/Get-AWSSizingInfo.ps1: line 1200 at <ScriptBlock>, /home/cloudshell-user/rubrik/rubrik-sizing-scripts/CLOUD/Get-AWSSizingInfo.ps1: line 1547 at <ScriptBlock>, <No file>: line 1 Transcript stopped, output file is /home/cloudshell-user/output_aws_2024-10-09_202508.log

This is the offending section of code:

     $selectionCounter = 1
      foreach ($selection in $selections) {
        Write-Progress -ID 12 -Activity "Processing Backup Plan/Selection: $($selection.SelectionId)" -Status "Backup Plan/Selection $($selectionCounter) of $($BackupPlans.Count)" -PercentComplete (($selectionCounter / $BackupPlans.Count) * 100)
        $selectionCounter++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant