Skip to content

Commit

Permalink
no default value for subid in custom file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
grhuangmsft committed Jan 19, 2024
1 parent f414931 commit a7546e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ param(

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Support.Category('Path')]
#[Microsoft.Azure.PowerShell.Cmdlets.Support.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# Azure subscription Id.
${SubscriptionId},
Expand Down Expand Up @@ -198,6 +197,7 @@ process {
# try{
if($SubscriptionId)
{
Write-Output "going into subscription id if statement for create"
New-AzSupportFile -SubscriptionId $SubscriptionId -Name $Name -WorkspaceName $WorkspaceName -FileSize $FileSize -ChunkSize $ChunkSize -NumberOfChunk $NumberOfChunks
}
else{
Expand All @@ -223,6 +223,7 @@ process {
$FileContent = [convert]::ToBase64String($FileContentByteArray[$startIndex..$endIndex])
#Write-Output "contents of file: " $FileContent
if($SubscriptionId){
Write-Output "going into subscription id if statement for upload"
Invoke-AzSupportUploadFile -SubscriptionId $SubscriptionId -FileName $Name -FileWorkspaceName $WorkspaceName -ChunkIndex $chunkIndex -Content $FileContent
}
else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Aliases:

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down

0 comments on commit a7546e4

Please sign in to comment.