Azure / Azure/azure-powershell
[Az.DesktopVirtualization] Get-AzWvdApplication Has a version number in the type
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description
The type for the avd application contains a version, if this changes it is a breaking change for any customer scripting which relies on pipelines.
There is a hostpool example below, but it's the same issue for this cmdlet
### Issue script & Debug output
```PowerShell
function Get-AvdImage {
[CmdletBinding()]
Param (
[Parameter(
ValuefromPipeline = $true,
Mandatory = $true
)]
[Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210712.HostPool]$HostPool
#[Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20200712.HostPool]$HostPool #APIVersion change
)
begin {
Set-StrictMode -Version Latest
} # begin
process {
$output = [PSCustomObject]@{
Name = $HostPool.Name
Image = $HostPool.VMTemplate | ConvertFrom-Json | Select-Object -ExpandProperty galleryImageOffer
}
Write-Output $output
} # process
end {} # end
} #function GetAvdImage
Get-AzWvdHostPool | Get-AvdImage
```
### 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.12.1 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
Assessment
This issue has not been assessed yet.