Azure / Azure/azure-powershell

[Az.DesktopVirtualization] When providing the name of an app the only output in the default view is name, and it's different than the one given

Open
#21,233 1 comment 0 reactions 1 assignee Assigned to @ryanosh View on GitHub
bug DesktopVirtualization Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

`Get-AzWvdApplication -ApplicationGroupName $ApplicationGroupName -ResourceGroupName $ResourceGroupName -Name 'Excel'`

The default view gives this:
```
Name
----
RMRail/Excel
```

Name should be consistent across the cmdlet

The cmdlet also hides the following information from the default view:

```
ApplicationType : Inbuilt
CommandLineArgument :
CommandLineSetting : DoNotAllow
Description :
FilePath : C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE
FriendlyName : Excel
IconContent : {0, 0, 1, 0…}
IconHash : bP2ubi8roMxobHIDPE_T71eGA8ctRqOgdzzDaX-y7ac
IconIndex : 0
IconPath : C:\Program Files\Microsoft Office\Root\VFS\Windows\Installer\{90160000-000F-0000-1000-0000000FF1CE}\xlicons.exe
Id : /subscriptions/d2cd2b8a-6d8f-4e4b-85ec-ef98cb93cc76/resourcegroups/DeleteMe/providers/Microsoft.DesktopVirtualization/applicationgroups/RMRail/applications/Excel
MsixPackageApplicationId :
MsixPackageFamilyName :
Name : RMRail/Excel
ObjectId : 35a84f97-89ee-40f9-f600-08db081c8003
ShowInPortal : True
Type : Microsoft.DesktopVirtualization/applicationgroups/applications
```

I would suggest 5 properties for the default view so it forms a table rather than a list in PoSh as is convention.

The properties I suggest are:

1. Name (But the actual name, not a concatenation of appgroup and name, this is currently called friendly name, but is referred to as the parameter 'name' in the input. Just make it consistent)
2. FilePath
3. CommandLineArgument
4. MsixPackageFamilyName
5. ShowInPortal

### Issue script & Debug output

```PowerShell
DEBUG: 12:12:58 - GetAzureRMContextCommand end processing.
DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: /subscriptions/d2cd2b8a-6d8f-4e4b-85ec-ef98cb93cc76/resourceGroups/DeleteMe/providers/Microsoft.DesktopVirtualization/applicationGroups/RMRail/applications/Excel?api-version=2021-07-12
DEBUG: RequestCreated: /subscriptions/d2cd2b8a-6d8f-4e4b-85ec-ef98cb93cc76/resourceGroups/DeleteMe/providers/Microsoft.DesktopVirtualization/applicationGroups/RMRail/applications/Excel?api-version=2021-07-12
DEBUG: HeaderParametersAdded:
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/d2cd2b8a-6d8f-4e4b-85ec-ef98cb93cc76/resourceGroups/DeleteMe/providers/Microsoft.DesktopVirtualization/applicationGroups/RMRail/applications/Excel?api-version=2021-07-12

Headers:
x-ms-unique-id : 91,92,93
x-ms-client-request-id : 46377ff8-54b0-41ec-afdb-962b9499fb33
CommandName : Get-AzWvdApplication
FullCommandName : Get-AzWvdApplication_Get
ParameterSetName : __AllParameterSets
User-Agent : AzurePowershell/v9.4.0,PSVersion/v7.3.3,Az.DesktopVirtualization/3.1.1

Body:

DEBUG: BeforeCall:
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
Vary : Accept-Encoding
x-ms-ratelimit-remaining-subscription-reads: 11999
X-Rate-Limit-Limit : 0
X-Rate-Limit-Remaining : 9223372036854775807
X-Rate-Limit-Reset : 0
x-ms-opsarmpath64 : L3N1YnNjcmlwdGlvbnMvZDJjZDJiOGEtNmQ4Zi00ZTRiLTg1ZWMtZWY5OGNiOTNjYzc2L3Jlc291cmNlR3JvdXBzL0RlbGV0ZU1lL3Byb3ZpZGVycy9NaWNyb3NvZnQuRGVza3RvcFZpcnR1YWxpemF0aW9uL2FwcGxpY2F0aW9uR3JvdXBzL1JNUmFpbC9hcHBsaWNhdGlvbnMvRXhjZWw=
x-ms-lamport-ts : 3738649235
x-ms-correlation-id : 2f88f04e-e742-4550-b4d2-f159788d9be8
x-ms-request-id : 46377ff8-54b0-41ec-afdb-962b9499fb33
X-Content-Type-Options : nosniff
Set-Cookie : ARRAffinity=f5470fbe5936e975d7ea3d27f2e0342f030da70792b406b6b677a0ce5a4d9dc1;Path=/;HttpOnly;Secure;Domain=rdarmprovider-g-gb-r0.wvd.microsoft.com,ARRAffinitySameSite=f5470fbe5936e975d7ea3d27f2e0342f030da70792b406b6b677a0ce5a4d9dc1;Path=/;HttpOnly;SameSite=None;Secure;Domain=rdarmprovider-g-gb-r0.wvd.microsoft.com
Server : Microsoft-IIS/10.0
X-Powered-By : ASP.NET
x-ms-correlation-request-id : 3286d3ad-6ee9-45fb-b7af-598a0db1c2a5
x-ms-routing-request-id : UKSOUTH:20230317T121301Z:3286d3ad-6ee9-45fb-b7af-598a0db1c2a5
Strict-Transport-Security : max-age=31536000; includeSubDomains
Date : Fri, 17 Mar 2023 12:13:00 GMT

Body:
{
"name": "RMRail/Excel",
"id": "/subscriptions/d2cd2b8a-6d8f-4e4b-85ec-ef98cb93cc76/resourcegroups/DeleteMe/providers/Microsoft.DesktopVirtualization/applicationgroups/RMRail/applications/Excel",
"type": "Microsoft.DesktopVirtualization/applicationgroups/applications",
"properties": {
"description": "",
"friendlyName": "Excel",
"filePath": "C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE",
"commandLineSetting": "DoNotAllow",
"commandLineArguments": "",
"showInPortal": true,
"iconPath": "C:\\Program Files\\Microsoft Office\\Root\\VFS\\Windows\\Installer\\{90160000-000F-0000-1000-0000000FF1CE}\\xlicons.exe",
"iconIndex": 0,
"iconHash": "bP2ubi8roMxobHIDPE_T71eGA8ctRqOgdzzDaX-y7ac",
"iconContent":
"applicationType": "Inbuilt",
"msixPackageFamilyName": null,
"msixPackageApplicationId": null,
"objectId": "35a84f97-89ee-40f9-f600-08db081c8003"
},
"systemData": {
"createdBy": "",
"createdByType": "User",
"createdAt": "2023-03-17T10:27:50.58Z",
"lastModifiedBy": "",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-03-17T10:27:50.58Z"
}
}

DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:

DEBUG: Finally:
DEBUG: CmdletAfterAPICall:
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletProcessRecordEnd:
Name
----
RMRail/Excel
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.11.2 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 3.1.1 Az.DesktopVirtualization {Disconnect-AzWvdUserSession, Expand-AzWvdMsixImage, Get-AzWvdApplication, Get-AzWvdApplicationGroup…}
```

### Error output

```PowerShell
N/A
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.