Skip to content

Commit f569094

Browse files
committed
Add migration guide for Az.6.0
1 parent b2e4e07 commit f569094

File tree

1 file changed

+378
-0
lines changed

1 file changed

+378
-0
lines changed
Lines changed: 378 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,378 @@
1+
# Migration Guide for Az 6.0.0
2+
- [Migration Guide for Az 6.0.0](#migration-guide-for-az-600)
3+
- [Az.Accounts](#azaccounts)
4+
- [`Connect-AzAccount`](#connect-azaccount)
5+
- [Az.ContainerInstance](#azcontainerinstance)
6+
- [`New-AzContainerGroup`](#new-azcontainergroup)
7+
- [`Remove-AzContainerGroup`](#remove-azcontainergroup)
8+
- [`Get-AzContainerGroup`](#get-azcontainergroup)
9+
- [`Get-AzContainerInstanceLog`](#get-azcontainerinstancelog)
10+
- [Az.DesktopVirtualization](#azdesktopvirtualization)
11+
- [`New-AzWvdHostPool`](#new-azwvdhostpool)
12+
- [`Expand-AzWvdMsixImage`](#expand-azwvdmsiximage)
13+
- [`New-AzWvdMsixPackage`](#new-azwvdmsixpackage)
14+
- [`Update-AzWvdHostPool`](#update-azwvdhostpool)
15+
- [Az.StreamAnalytics](#azstreamanalytics)
16+
- [`Get-AzStreamAnalyticsDefaultFunctionDefinition`](#get-azstreamanalyticsdefaultfunctiondefinition)
17+
- [`New-AzStreamAnalyticsJob`](#new-azstreamanalyticsjob)
18+
- [`New-AzStreamAnalyticsTransformation`](#new-azstreamanalyticstransformation)
19+
- [Az.RecoveryServices](#azrecoveryservices)
20+
- [`Set-AzRecoveryServicesBackupProperty`](#set-azrecoveryservicesbackupproperty)
21+
- [`Get-AzRecoveryServicesBackupJobDetail`](#get-azrecoveryservicesbackupjobdetail)
22+
- [Az.Storage](#azstorage)
23+
- [`Remove-AzRmStorageShare`](#remove-azrmstorageshare)
24+
- [Az.ServiceFabric](#azservicefabric)
25+
- [`Add-AzServiceFabricClusterCertificate`](#add-azservicefabricclustercertificate)
26+
- [`Get-AzServiceFabricManagedClusterService`](#get-azservicefabricmanagedclusterservice)
27+
- [`New-AzServiceFabricManagedCluster`](#new-azservicefabricmanagedcluster)
28+
- [`New-AzServiceFabricManagedClusterService`](#new-azservicefabricmanagedclusterservice)
29+
- [`Remove-AzServiceFabricClusterCertificate`](#remove-azservicefabricclustercertificate)
30+
- [`Remove-AzServiceFabricManagedClusterService`](#remove-azservicefabricmanagedclusterservice)
31+
- [`Set-AzServiceFabricManagedCluster`](#set-azservicefabricmanagedcluster)
32+
- [`Set-AzServiceFabricManagedClusterService`](#set-azservicefabricmanagedclusterservice)
33+
## Az.Accounts
34+
35+
### `Connect-AzAccount`
36+
Removed obsolete parameters ManagedServiceHostName, ManagedServicePort and ManagedServiceSecret.
37+
38+
#### Before
39+
```powershell
40+
Connect-AzAccount -Identity -ManagedServiceSecret $secret
41+
```
42+
#### After
43+
```powershell
44+
#To use customized MSI endpoint, please set environment variable MSI_ENDPOINT, e.g. "http://localhost:50342/oauth2/token"; to use customized MSI secret, please set environment variable MSI_SECRET.
45+
Connect-AzAccount -Identity
46+
```
47+
48+
49+
## Az.ContainerInstance
50+
51+
### `New-AzContainerGroup`
52+
No longer supports the parameter `Image`, `RegistryCredential`, `AzureFileVolumeShareName`, `AzureFileVolumeAccountCredential`, `AzureFileVolumeMountPath`, `IdentityId`, `AssignIdentity`, `OsType`, `Cpu`, `MemoryInGB`, `IpAddressType`, `DnsNameLabel`, `Port`, `Command`, `EnvironmentVariable`, `RegistryServerDomain` and no alias was found for the original parameter name.
53+
54+
#### Before
55+
```powershell
56+
PS C:\> New-AzContainerGroup -ResourceGroupName demo -Name mycontainer -Image nginx -OsType Linux -IpAddressType Public -Port @(8000)
57+
58+
ResourceGroupName : demo
59+
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
60+
Name : mycontainer
61+
Type : Microsoft.ContainerInstance/containerGroups
62+
Location : westus
63+
Tags :
64+
ProvisioningState : Creating
65+
Containers : {mycontainer}
66+
ImageRegistryCredentials :
67+
RestartPolicy :
68+
IpAddress : 13.88.10.240
69+
Ports : {8000}
70+
OsType : Linux
71+
Volumes :
72+
State : Running
73+
Events : {}
74+
```
75+
#### After
76+
```powershell
77+
PS C:\> $port1 = New-AzContainerInstancePortObject -Port 8000 -Protocol TCP
78+
PS C:\> $port2 = New-AzContainerInstancePortObject -Port 8001 -Protocol TCP
79+
PS C:\> $container = New-AzContainerInstanceObject -Name test-container -Image nginx -RequestCpu 1 -RequestMemoryInGb 1.5 -Port @($port1, $port2)
80+
PS C:\> $containerGroup = New-AzContainerGroup -ResourceGroupName test-rg -Name test-cg -Location eastus -Container $container -OsType Linux -RestartPolicy "Never" -IpAddressType Public
81+
82+
Location Name Type
83+
-------- ---- ----
84+
eastus test-cg Microsoft.ContainerInstance/containerGroups
85+
```
86+
87+
88+
### `Remove-AzContainerGroup`
89+
The cmdlet 'Remove-AzContainerGroup' no longer supports the parameter 'ResourceId' and no alias was found for the original parameter name.
90+
91+
#### Before
92+
```powershell
93+
PS C:\> Find-AzResource -ResourceGroupEquals MyResourceGroup -ResourceNameEquals MyContainer | Remove-AzContainerGroup
94+
```
95+
#### After
96+
```powershell
97+
PS C:\> Remove-AzContainerGroup -Name test-cg -ResourceGroupName test-rg
98+
99+
Location Name Type
100+
-------- ---- ----
101+
eastus test-cg Microsoft.ContainerInstance/containerGroups
102+
```
103+
104+
105+
### `Get-AzContainerGroup`
106+
The cmdlet 'Get-AzContainerGroup' no longer supports the parameter 'ResourceId' and no alias was found for the original parameter name.
107+
108+
#### Before
109+
```powershell
110+
PS C:\> Find-AzResource -ResourceGroupEquals demo -ResourceNameEquals mycontainer | Get-AzContainerGroup
111+
112+
ResourceGroupName : demo
113+
Id : /subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
114+
Name : mycontainer
115+
Type : Microsoft.ContainerInstance/containerGroups
116+
Location : westus
117+
Tags :
118+
ProvisioningState : Succeeded
119+
Containers : {mycontainer}
120+
ImageRegistryCredentials :
121+
RestartPolicy :
122+
IpAddress : 13.88.10.240
123+
Ports : {8000}
124+
OsType : Linux
125+
Volumes :
126+
State : Running
127+
Events : {}
128+
```
129+
#### After
130+
```powershell
131+
PS C:\> Get-AzContainerGroup
132+
133+
Location Name Type
134+
-------- ---- ----
135+
eastus bez-cg1 Microsoft.ContainerInstance/containerGroups
136+
eastus bez-cg2 Microsoft.ContainerInstance/containerGroups
137+
```
138+
139+
140+
### `Get-AzContainerInstanceLog`
141+
The cmdlet 'Get-AzContainerInstanceLog' no longer supports the parameter 'ResourceId' and no alias was found for the original parameter name.
142+
The cmdlet 'Get-AzContainerInstanceLog' no longer supports the parameter 'Name' and no alias was found for the original parameter name.
143+
144+
#### Before
145+
```powershell
146+
PS C:\> Get-AzContainerGroup -ResourceGroupName demo -Name mycontainer | Get-AzContainerInstanceLog
147+
148+
Log line 1.
149+
Log line 2.
150+
Log line 3.
151+
Log line 4.
152+
```
153+
#### After
154+
```powershell
155+
PS C:\> Get-AzContainerInstanceLog -ContainerGroupName test-cg -ContainerName test-container -ResourceGroupName test-rg
156+
```
157+
## Az.DesktopVirtualization
158+
159+
### `New-AzWvdHostPool`
160+
The cmdlet 'New-AzWvdHostPool' no longer supports the parameter 'SsoContext' and no alias was found for the original parameter name.
161+
162+
### `Expand-AzWvdMsixImage`
163+
The cmdlet 'Expand-AzWvdMsixImage' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixImageUri' for parameter 'MsixImageUri'.
164+
165+
#### Before
166+
```powershell
167+
$MsixImageUri = [Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixImageUri]::New()
168+
Get-AzWvdDesktop -ResourceGroupName ResourceGroupName -ApplicationGroupName ApplicationGroupName -Name DesktopName | Expand-AzWvdMsixImage -MsixImageUri $MsixImageUri
169+
```
170+
#### After
171+
```powershell
172+
$MsixImageUri = [Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210201Preview.IMsixImageUri]::New()
173+
Get-AzWvdDesktop -ResourceGroupName ResourceGroupName -ApplicationGroupName ApplicationGroupName -Name DesktopName | Expand-AzWvdMsixImage -MsixImageUri $MsixImageUri
174+
```
175+
176+
177+
### `New-AzWvdMsixPackage`
178+
The element type for parameter 'PackageApplication' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixPackageApplications' to 'Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210201Preview.IMsixPackageApplications'.
179+
The element type for parameter 'PackageDependency' has been changed from 'Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixPackageDependencies' to 'Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210201Preview.IMsixPackageDependencies'.
180+
181+
#### Before
182+
```powershell
183+
PS C:\> $apps = @([Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixPackageApplications]::New())
184+
PS C:\> $deps = @([Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20201102Preview.IMsixPackageDependencies]::New())
185+
PS C:\> New-AzWvdMsixPackage -FullName PackageFullName `
186+
-HostPoolName HostPoolName `
187+
-ResourceGroupName ResourceGroupName `
188+
-SubscriptionId SubscriptionId `
189+
-DisplayName displayname `
190+
-ImagePath imageURI `
191+
-IsActive:$false `
192+
-IsRegularRegistration:$false `
193+
-LastUpdated datelastupdated `
194+
-PackageApplication $apps `
195+
-PackageDependency $deps `
196+
-PackageFamilyName packagefamilyname `
197+
-PackageName packagename `
198+
-PackageRelativePath packagerelativepath `
199+
-Version packageversion `
200+
```
201+
#### After
202+
```powershell
203+
PS C:\> $apps = @([Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210201Preview.IMsixPackageApplications]::New())
204+
PS C:\> $deps = @([Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20210201Preview.IMsixPackageDependencies]::New())
205+
PS C:\> New-AzWvdMsixPackage -FullName PackageFullName `
206+
-HostPoolName HostPoolName `
207+
-ResourceGroupName ResourceGroupName `
208+
-SubscriptionId SubscriptionId `
209+
-DisplayName displayname `
210+
-ImagePath imageURI `
211+
-IsActive:$false `
212+
-IsRegularRegistration:$false `
213+
-LastUpdated datelastupdated `
214+
-PackageApplication $apps `
215+
-PackageDependency $deps `
216+
-PackageFamilyName packagefamilyname `
217+
-PackageName packagename `
218+
-PackageRelativePath packagerelativepath `
219+
-Version packageversion `
220+
```
221+
222+
223+
### `Update-AzWvdHostPool`
224+
The cmdlet 'Update-AzWvdHostPool' no longer supports the parameter 'SsoContext' and no alias was found for the original parameter name.
225+
226+
227+
228+
## Az.StreamAnalytics
229+
230+
### `Get-AzStreamAnalyticsDefaultFunctionDefinition`
231+
232+
The cmdlet 'Get-AzStreamAnalyticsDefaultFunctionDefinition' no longer supports the parameter 'File' and no alias was found for the original parameter name.
233+
234+
#### Before
235+
```powershell
236+
Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName "StreamAnalytics-Default-West-US" -JobName "StreamJob22" -File "C:\RetrieveDefaultDefinitionRequest.json" -Name "ScoreTweet"
237+
Please refer to https://github.com/Azure/azure-powershell/blob/v5.9.0-May2021/src/StreamAnalytics/StreamAnalytics.Test/Resources/RetrieveDefaultFunctionDefinitionRequest.json for an example of the input file.
238+
```
239+
#### After
240+
```powershell
241+
Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 -BindingType Microsoft.MachineLearningServices -Endpoint "http://875da830-4d5f-44f1-b221-718a5f26a21d.eastus.azurecontainer.io/score"-UdfType Scalar
242+
Input is specified in flattened parameters instead from the input file.
243+
```
244+
245+
246+
### `New-AzStreamAnalyticsJob`
247+
The cmdlet 'New-AzStreamAnalyticsJob' no longer supports the parameter 'File' and no alias was found for the original parameter name.
248+
249+
#### Before
250+
```powershell
251+
New-AzStreamAnalyticsJob -ResourceGroupName "StreamAnalytics-Default-West-US" -File "C:\JobDefinition.json"
252+
Please refer to https://github.com/Azure/azure-powershell/blob/v5.9.0-May2021/src/StreamAnalytics/StreamAnalytics.Test/Resources/Job.json for an example of the input file.
253+
```
254+
#### After
255+
```powershell
256+
New-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-02-pwsh -Location westcentralus -SkuName Standard
257+
Input is specified in flattened parameters instead from the input file.
258+
```
259+
260+
261+
### `New-AzStreamAnalyticsTransformation`
262+
The cmdlet 'New-AzStreamAnalyticsTransformation' no longer supports the parameter 'File' and no alias was found for the original parameter name.
263+
264+
#### Before
265+
```powershell
266+
New-AzStreamAnalyticsTransformation -ResourceGroupName "StreamAnalytics-Default-West-US" -File "C:\Transformation.json" -JobName "StreamingJob" -Name "StreamingJobTransform"
267+
Please refer to https://github.com/Azure/azure-powershell/blob/v5.9.0-May2021/src/StreamAnalytics/StreamAnalytics.Test/Resources/Transformation.json for an example fo the input file.
268+
```
269+
#### After
270+
```powershell
271+
New-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name tranf-01 -StreamingUnit 6 -Query "Select Id, Name from input-01"
272+
Input is specified in flattened parameters instead from the input file.
273+
```
274+
275+
276+
## Az.RecoveryServices
277+
278+
### `Set-AzRecoveryServicesBackupProperty`
279+
Removed Set-AzRecoveryServicesBackupProperties plural alias, use Set-AzRecoveryServicesBackupProperty cmdlet name going forward
280+
281+
### `Get-AzRecoveryServicesBackupJobDetail`
282+
Removed Get-AzRecoveryServicesBackupJobDetails plural alias, use Get-AzRecoveryServicesBackupJobDetail cmdlet name going forward
283+
284+
#### Before
285+
```powershell
286+
$jobDetails = Get-AzRecoveryServicesBackupJobDetails -VaultId $vault.ID -Job $job
287+
$jobDetails2 = Get-AzRecoveryServicesBackupJobDetails -VaultId $vault.ID -JobId $job.JobId
288+
```
289+
#### After
290+
```powershell
291+
$jobDetails = Get-AzRecoveryServicesBackupJobDetail -VaultId $vault.ID -Job $job
292+
$jobDetails2 = Get-AzRecoveryServicesBackupJobDetail -VaultId $vault.ID -JobId $job.JobId
293+
```
294+
295+
296+
## Az.Storage
297+
298+
### `Remove-AzRmStorageShare`
299+
The cmdlet 'Remove-AzRmStorageShare' can remove share with snapshots by default before; but after the change remove share with snapshots will fail by default, need add parameter "-Include Snapshots" to make remove success.
300+
301+
#### Before
302+
```powershell
303+
Remove-AzRmStorageShare -ResourceGroupName $resourceGroupName -StorageAccountName $accountName -Name $shareName
304+
```
305+
#### After
306+
```powershell
307+
Remove-AzRmStorageShare -ResourceGroupName $resourceGroupName -StorageAccountName $accountName -Name $shareName -Force -Include Snapshots
308+
```
309+
310+
311+
## Az.ServiceFabric
312+
313+
### `Add-AzServiceFabricClusterCertificate`
314+
this cmdlet has been removed completly. please follow instructions here to add cluster certificates: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-security-update-certs-azure#add-a-secondary-certificate-using-azure-resource-manager
315+
316+
### `Get-AzServiceFabricManagedClusterService`
317+
Change PSManagedService model to avoid using the properties parameter directly from sdk. Now all the properties are in the first level of the object.
318+
And remove deprecated parameters InstanceCloseDelayDuration, DropSourceReplicaOnMove and ServiceDnsName
319+
320+
#### Before
321+
```powershell
322+
$service = Get-AzServiceFabricManagedClusterService -ResourceId $resourceId
323+
$statelessService.Properties.ProvisioningState
324+
```
325+
#### After
326+
```powershell
327+
$service = Get-AzServiceFabricManagedClusterService -ResourceId $resourceId
328+
$statelessService.ProvisioningState
329+
```
330+
331+
332+
### `New-AzServiceFabricManagedCluster`
333+
Remove deprecated parameter ReverseProxyEndpointPort.
334+
335+
### `New-AzServiceFabricManagedClusterService`
336+
Change PSManagedService model to avoid using the properties parameter directly from sdk. Now all the properties are in the first level of the object.
337+
And remove deprecated parameters InstanceCloseDelayDuration, DropSourceReplicaOnMove and ServiceDnsName
338+
339+
#### Before
340+
```powershell
341+
$service = New-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateless -InstanceCount -1 -PartitionSchemaSingleton
342+
$statelessService.Properties.ProvisioningState
343+
```
344+
#### After
345+
```powershell
346+
$service = New-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateless -InstanceCount -1 -PartitionSchemaSingleton
347+
$statelessService.ProvisioningState
348+
```
349+
350+
351+
### `Remove-AzServiceFabricClusterCertificate`
352+
this cmdlet has been removed completly. please follow instructions here to add cluster certificates: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-security-update-certs-azure#remove-a-cluster-certificate-using-the-portal
353+
354+
### `Remove-AzServiceFabricManagedClusterService`
355+
Change PSManagedService model to avoid using the properties parameter directly from sdk. Now all the properties are in the first level of the object.
356+
357+
### `Set-AzServiceFabricManagedCluster`
358+
Remove deprecated parameter ReverseProxyEndpointPort.
359+
360+
### `Set-AzServiceFabricManagedClusterService`
361+
Change PSManagedService model to avoid using the properties parameter directly from sdk. Now all the properties are in the first level of the object.
362+
And remove deprecated parameters InstanceCloseDelayDuration, DropSourceReplicaOnMove and ServiceDnsName
363+
364+
#### Before
365+
```powershell
366+
$service = Get-AzServiceFabricManagedClusterService -ResourceId $resourceId
367+
$statelessService.Properties.MinInstanceCount = 3
368+
service | Set-AzServiceFabricManagedClusterService
369+
```
370+
#### After
371+
```powershell
372+
$service = Get-AzServiceFabricManagedClusterService -ResourceId $resourceId
373+
$statelessService.MinInstanceCount = 3
374+
service | Set-AzServiceFabricManagedClusterService
375+
```
376+
377+
378+

0 commit comments

Comments
 (0)