Get-AzSupportTicket
Get support tickets.
Syntax
Get-AzSupportTicket
[-Filter <String>]
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzSupportTicket
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Description
Gets the list of support tickets. It will retrieve all the support tickets if you do not specify any parameters. You can also filter the support tickets by Status or CreatedDate using the Filter parameter. Here are some examples of filter values that you can specify.
Scenario | Filter |
---|---|
Get tickets that are in open state | "Status eq 'Open'" |
Get tickets that are in closed state | "Status eq 'Closed'" |
Get tickets that were created on or after 20th Dec, 2019 | "CreatedDate ge 2019-12-20" |
Get tickets that were created after 20th Dec, 2019 | "CreatedDate gt 2019-12-20" |
Gets tickets created after 20th Dec, 2019 that are in open state | "CreatedDate gt 2019-12-20 and Status eq 'Open'" |
This cmdlet supports paging via First and Skip parameters.
You can also retrieve a single support ticket by specifying the ticket name.
Examples
Example 1: Get first 2 tickets
Get-AzSupportTicket -First 2
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
---- ----- --------------- -------- ------------------ ------ -----------
test1 test title1 150010521000317 Minimal Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
test2 test title2 150010521000318 Minimal Billing Closed 2/5/2020 1:33:53 AM
Example 2: Get first 2 tickets after skipping the first 2
Get-AzSupportTicket -Skip 2 -First 2
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
---- ----- --------------- -------- ------------------ ------ -----------
test3 test title3 150010521000314 Minimal Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
test4 test title4 150010521000315 Minimal Billing Closed 2/5/2020 1:33:53 AM
Example 3: Get a support ticket by name
Get-AzSupportTicket -Name "test1"
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
---- ----- --------------- -------- ------------------ ------ -----------
test1 test title1 150010521000317 Minimal Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
Example 4: Get first 2 support tickets filtered by status
Get-AzSupportTicket -Filter "Status eq 'Closed'" -First 2
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
---- ----- --------------- -------- ------------------ ------ -----------
test1 test title1 150010521000317 Minimal Virtual Machine running Linux Closed 2/5/2020 1:33:53 AM
test2 test title2 150010521000318 Minimal Billing Closed 2/5/2020 1:33:53 AM
Example 5: Get all support tickets that are in Open state and created after Dec 20th, 2019
Get-AzSupportTicket -Filter "Status eq 'Open' and CreatedDate gt 2019-12-20"
Name Title SupportTicketId Severity ServiceDisplayName Status CreatedDate
---- ----- --------------- -------- ------------------ ------ -----------
test6 test title6 150010521000311 Minimal Virtual Machine running Linux Open 2/5/2020 1:33:53 AM
test7 test title7 150010521000312 Minimal Billing Open 2/5/2020 1:33:53 AM
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
Filter to be applied to the results of this cmdlet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-First
Gets only the specified number of objects. Enter the number of objects to get.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IncludeTotalCount
Reports the total number of objects in the data set (an integer) followed by the selected objects. If the cmdlet cannot determine the total count, it displays "Unknown total count." The integer has an Accuracy property that indicates the reliability of the total count value. The value of Accuracy ranges from 0.0 to 1.0 where 0.0 means that the cmdlet could not count the objects, 1.0 means that the count is exact, and a value between 0.0 and 1.0 indicates an increasingly reliable estimate.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of support ticket that this cmdlet gets.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Skip
Ignores the specified number of objects and then gets the remaining objects. Enter the number of objects to skip.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None