Skip to content

Commit e88acb4

Browse files
authored
Merge branch 'preview' into disable
2 parents c34aa6c + 1b62d96 commit e88acb4

File tree

112 files changed

+3310
-457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3310
-457
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ after_success:
2727
docker build . -t $DOCKER_USER/$NAME:$TRAVIS_COMMIT --build-arg CONFIG=$CONFIG;
2828
docker tag $DOCKER_USER/$NAME:$TRAVIS_COMMIT $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
2929

30-
docker login -u $DOCKER_USER -p $DOCKER_PASS;
30+
echo "$DOCKER_PASS" | docker login -u $DOCKER_USER --password-stdin;
3131

3232
docker push $DOCKER_USER/$NAME:$TRAVIS_COMMIT;
3333
docker push $DOCKER_USER/$NAME:$TRAVIS_BRANCH;

Azure.PowerShell.Netcore.sln

Lines changed: 1 addition & 141 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To install the module containing the legacy RDFE cmdlets, run the following comm
3838
Install-Module -Name Azure
3939
```
4040

41-
If you have an earlier version of the Azure PowerShell modules installed from the PowerShell Gallery and would like to update to the latest version, run the following commands in an elevated PowerShell session:
41+
If you have an earlier version of the Azure PowerShell modules installed from the PowerShell Gallery and would like to update to the latest version, run the following commands in an elevated PowerShell session. Update-Module installs the new version side-by-side with the old version. It does not remove the old version.
4242

4343
```powershell
4444
# Update to the latest version of AzureRM

build.proj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<NetCore Condition=" $(NetCore) == '' " >false</NetCore>
5454
<SkipHelp Condition =" '$(SkipHelp)' == '' ">false</SkipHelp>
5555
<BuildTasksPath>$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks\bin\$(Configuration)</BuildTasksPath>
56-
<Stack Condition = "'$(Scope)' == '' or '$(Scope)' == 'all' or '$(Scope)' == 'Stack' ">true</Stack>
56+
<Stack Condition = "(('$(Scope)' == '' or '$(Scope)' == 'all') and '$(NetCore)' == 'false') or '$(Scope)' == 'Stack' ">true</Stack>
5757
<Latest Condition = "'$(Scope)' == '' or '$(Scope)' != 'Stack'">true</Latest>
5858
</PropertyGroup>
5959
<ItemGroup>
@@ -71,7 +71,7 @@
7171

7272
<StaticAnalysis Include=".\tools\StaticAnalysis\StaticAnalysis.sln" />
7373
<LocalBuildTasks Include="$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks.sln" />
74-
<LocalBuildTasks Include="$(LibraryToolsFolder)\RepoTasks\RepoTasks.sln" />
74+
<LocalBuildTasks Include="$(LibraryToolsFolder)\RepoTasks\RepoTasks.sln" Condition="'$(NetCore)' == 'false'"/>
7575
</ItemGroup>
7676

7777
<!-- Tasks -->
@@ -417,7 +417,7 @@
417417
Condition="!$(DelaySign) and '@(ScriptsToSign)' != ''"/>
418418

419419
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\CheckSignature.ps1 -CustomPath $(LibrarySourceFolder)\Package\$(Configuration) &quot;"
420-
ContinueOnError="ErrorAndContinue" />
420+
ContinueOnError="ErrorAndContinue" Condition="'$(NetCore)' == 'false'"/>
421421

422422
<!-- Copying signed shortcut back -->
423423
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.Netcore.psd1"

src/Common/Commands.Common.Authentication/Common.Authentication.Netcore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.8" />
25+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.12" />
2626
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2727
<PackageReference Include="System.Reflection" Version="4.3.0" />
2828
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />

src/Common/Commands.Common.Storage/Common.Storage.Netcore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
<ItemGroup>
2525
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.2.12" />
26-
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="6.5.0-preview" />
27-
<PackageReference Include="WindowsAzure.Storage" Version="8.1.1" />
26+
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="7.1.0-preview" />
27+
<PackageReference Include="WindowsAzure.Storage" Version="9.0.0" />
2828
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
2929
</ItemGroup>
3030

src/Common/Commands.Common/Utilities/Validate.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ public static void ValidateInternetConnection()
209209
{
210210
throw new Exception(Resources.NoInternetConnection);
211211
}
212-
#else
213-
throw new NotSupportedException();
214212
#endif
215213
}
216214

src/ResourceManager/Aks/AzureRM.Aks.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\YamlDotNet.dll',
@@ -113,7 +113,7 @@ PrivateData = @{
113113

114114
# External dependent modules of this module
115115
# ExternalModuleDependencies = ''
116-
Prerelease = 'preview'
116+
# Prerelease = ''
117117

118118
} # End of PSData hashtable
119119

src/ResourceManager/AnalysisServices/AzureRM.AnalysisServices.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.Analysis.dll'
@@ -116,7 +116,7 @@ PrivateData = @{
116116
# IconUri = ''
117117

118118
# ReleaseNotes of this module
119-
ReleaseNotes = ''
119+
ReleaseNotes = 'Initial Release'
120120

121121
# Prerelease string of this module
122122
# Prerelease = ''

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Azure.AnalysisServices.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = @()
@@ -110,7 +110,7 @@ PrivateData = @{
110110
# IconUri = ''
111111

112112
# ReleaseNotes of this module
113-
ReleaseNotes = ''
113+
ReleaseNotes = 'Initial Release'
114114

115115
# Prerelease string of this module
116116
# Prerelease = ''

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.Netcore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.10" />
32-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.10" />
31+
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.11" />
32+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.12" />
3333
<PackageReference Include="Microsoft.WindowsAzure.Management" Version="4.1.1" />
3434
</ItemGroup>
3535

src/ResourceManager/ApiManagement/AzureRM.ApiManagement.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\AutoMapper.dll', '.\Microsoft.Azure.Management.ApiManagement.dll'
@@ -182,7 +182,7 @@ PrivateData = @{
182182
# IconUri = ''
183183

184184
# ReleaseNotes of this module
185-
ReleaseNotes = ''
185+
ReleaseNotes = 'Initial Release'
186186

187187
# Prerelease string of this module
188188
# Prerelease = ''

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.Netcore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="AutoMapper" Version="6.0.2" />
31+
<PackageReference Include="AutoMapper" Version="6.2.2" />
3232
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="3.4.0-preview" />
3333
</ItemGroup>
3434

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.Netcore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="AutoMapper" Version="6.0.2" />
31+
<PackageReference Include="AutoMapper" Version="6.2.2" />
3232
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="3.4.0-preview" />
3333
</ItemGroup>
3434

src/ResourceManager/ApplicationInsights/AzureRM.ApplicationInsights.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.ApplicationInsights.dll'
@@ -117,7 +117,7 @@ PrivateData = @{
117117
# IconUri = ''
118118

119119
# ReleaseNotes of this module
120-
ReleaseNotes = ''
120+
ReleaseNotes = 'Initial Release'
121121

122122
# Prerelease string of this module
123123
# Prerelease = ''

src/ResourceManager/Automation/AzureRM.Automation.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.Automation.dll'
@@ -162,7 +162,7 @@ PrivateData = @{
162162
# IconUri = ''
163163

164164
# ReleaseNotes of this module
165-
ReleaseNotes = ''
165+
ReleaseNotes = 'Initial Release'
166166

167167
# Prerelease string of this module
168168
# Prerelease = ''

src/ResourceManager/AzureBackup/AzureRM.Backup.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Management.BackupServicesManagement.dll',
@@ -124,7 +124,7 @@ PrivateData = @{
124124
# IconUri = ''
125125

126126
# ReleaseNotes of this module
127-
ReleaseNotes = ''
127+
ReleaseNotes = 'Initial Release'
128128

129129
# Prerelease string of this module
130130
# Prerelease = ''

src/ResourceManager/AzureBatch/AzureRM.Batch.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.10.0'
15+
ModuleVersion = '0.11.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core'
@@ -51,7 +51,7 @@ PowerShellVersion = '5.1'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.11.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = '.\Microsoft.Azure.Batch.dll',
@@ -143,7 +143,7 @@ PrivateData = @{
143143
# IconUri = ''
144144

145145
# ReleaseNotes of this module
146-
ReleaseNotes = ''
146+
ReleaseNotes = 'Initial Release'
147147

148148
# Prerelease string of this module
149149
# Prerelease = ''

src/ResourceManager/AzureBatch/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020
## Current Release
2121
* Set minimum dependency of module to PowerShell 5.0
22+
* Updated New-AzureBatchPool documentation to remove deprecated example
2223

2324
## Version 4.0.6
2425
* Updated to the latest version of the Azure ClientRuntime

src/ResourceManager/AzureBatch/Commands.Batch/help/New-AzureBatchPool.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,34 +76,48 @@ The **New-AzureBatchPool** cmdlet creates a pool in the Azure Batch service unde
7676

7777
## EXAMPLES
7878

79-
### Example 1: Create a new pool using the TargetDedicated parameter set
79+
### Example 1: Create a new pool using the TargetDedicated parameter set using CloudServiceConfiguration
8080
```
81-
PS C:\>New-AzureBatchPool -Id "MyPool" -VirtualMachineSize "Small" -OSFamily "4" -TargetOSVersion "*" -TargetDedicatedComputeNodes 3 -BatchContext $Context
81+
PS C:\>$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSCloudServiceConfiguration" -ArgumentList @(4,"*")
82+
PS C:\>New-AzureBatchPool -Id "MyPool" -VirtualMachineSize "Small" -CloudServiceConfiguration $configuration -TargetDedicatedComputeNodes 3 -BatchContext $Context
83+
```
84+
85+
### Example 2: Create a new pool using the TargetDedicated parameter set using VirtualMachineConfiguration
86+
```
87+
PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
88+
PS C:\>$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
89+
PS C:\>New-AzureBatchPool -Id "MyPool" -VirtualMachineSize "Small" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -BatchContext $Context
8290
```
8391

8492
This command creates a new pool with ID MyPool using the TargetDedicated parameter set.
8593
The target allocation is three compute nodes.
8694
The pool is configured to use small virtual machines imaged with the latest operating system version of family four.
8795

88-
### Example 2: Create a new pool using the AutoScale parameter set
96+
### Example 3: Create a new pool using the AutoScale parameter set
8997
```
90-
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -OSFamily "4" -TargetOSVersion "*" -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context
98+
PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
99+
PS C:\>$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
100+
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration $configuration -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context
91101
```
92102

93103
This command creates a new pool with ID AutoScalePool using the AutoScale parameter set.
94104
The pool is configured to use small virtual machines imaged with the latest operating system version of family four, and the target number of compute nodes are determined by the Autoscale formula.
95105

96-
### Example 3: Create a pool with nodes in a subnet
106+
### Example 4: Create a pool with nodes in a subnet
97107
```
108+
PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
109+
PS C:\>$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
98110
PS C:\>$networkConfig = New-Object Microsoft.Azure.Commands.Batch.Models.PSNetworkConfiguration
99111
PS C:\>$networkConfig.SubnetId = "/subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}"
100-
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -OSFamily "4" -TargetDedicatedComputeNodes 3 -NetworkConfiguration $networkConfig -BatchContext $Context
112+
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -NetworkConfiguration $networkConfig -BatchContext $Context
101113
```
102114

103-
### Example 4: Create a pool with custom user accounts
115+
### Example 5: Create a pool with custom user accounts
104116
```
117+
PS C:\$imageReference = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSImageReference" -ArgumentList @("WindowsServer", "MicrosoftWindowsServer", "2016-Datacenter", "*")
118+
PS C:\>$configuration = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.VirtualMachineConfiguration" -ArgumentList @($imageReference, "batch.node.windows amd64")
105119
PS C:\>$userAccount = New-Object Microsoft.Azure.Commands.Batch.Models.PSUserAccount -ArgumentList @("myaccount", "mypassword")
106-
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -OSFamily "4" -TargetDedicatedComputeNodes 3 -UserAccount $userAccount
120+
PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "Small" -VirtualMachineConfiguration $configuration -TargetDedicatedComputeNodes 3 -UserAccount $userAccount
107121
```
108122

109123
## PARAMETERS

0 commit comments

Comments
 (0)