New-AzSupportFileAndUpload
Creates and uploads a new file under a workspace for the specified subscription.
Syntax
New-AzSupportFileAndUpload
-WorkspaceName <String>
[-SubscriptionId <String>]
-FilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates and uploads a new file under a workspace for the specified subscription.
Examples
Example 1: Create and upload a file to a file workspace
New-AzSupportFileAndUpload -WorkspaceName "testworkspace" -FilePath "C:\path\to\file\test.txt"
ChunkSize : 4
CreatedOn : 2/9/2024 4:06:13 PM
FileSize : 4
Id : /subscriptions/3bb7379e-e102-4603-a59c-60f5ca39ec55/providers/Microsoft.Support/fileWorkspaces/testworkspace/files/test.txt
Name : test.txt
NumberOfChunk : 1
ResourceGroupName :
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Support/files
Create a new file and upload content in a file workspace for an Azure subscription.
Example 2: Create and upload a file to a support ticket
New-AzSupportFileAndUpload -WorkspaceName "2402084010005835" -FilePath "C:\path\to\file\test.txt"
ChunkSize : 4
CreatedOn : 2/9/2024 4:06:13 PM
FileSize : 4
Id : /subscriptions/3bb7379e-e102-4603-a59c-60f5ca39ec55/providers/Microsoft.Support/fileWorkspaces/2402084010005835/files/test.txt
Name : test.txt
NumberOfChunk : 1
ResourceGroupName :
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Support/files
Create a new file and upload content to a support ticket in an Azure subscription.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilePath
Path of the file to be uploaded
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Azure subscription Id.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WorkspaceName
File workspace name.
Type: | String |
Aliases: | FileWorkspaceName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell