diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs index 6cb52d03fe9d..e5e1f959ace6 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs @@ -170,7 +170,7 @@ private void TestReimageComputeNode(bool usePipeline) } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.Get, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] public class GetBatchComputeNodeScenarioTestCommand : GetBatchComputeNodeCommand { protected override void ProcessRecord() @@ -180,7 +180,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Restart, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)] + [Cmdlet(VerbsLifecycle.Restart, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)] public class RestartBatchComputeNodeScenarioTestCommand : RestartBatchComputeNodeCommand { protected override void ProcessRecord() @@ -190,7 +190,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Reset, "AzureRMBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)] + [Cmdlet(VerbsCommon.Reset, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)] public class ResetBatchComputeNodeScenarioTestCommand : ResetBatchComputeNodeCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1 index 717a593ca51c..8447cbb25ae7 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1 @@ -21,14 +21,14 @@ function Test-GetComputeNodeById param([string]$accountName, [string]$poolId) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $computeNodeId = (Get-AzureRMBatchComputeNode_ST -PoolId $poolId -BatchContext $context)[0].Id + $computeNodeId = (Get-AzureBatchComputeNode_ST -PoolId $poolId -BatchContext $context)[0].Id - $computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context Assert-AreEqual $computeNodeId $computeNode.Id # Verify positional parameters also work - $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context Assert-AreEqual $computeNodeId $computeNode.Id } @@ -44,7 +44,7 @@ function Test-ListComputeNodesByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "state eq '" + "$state" + "'" - $computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter $filter -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter $filter -BatchContext $context Assert-AreEqual $matches $computeNodes.Length foreach($node in $computeNodes) @@ -53,8 +53,8 @@ function Test-ListComputeNodesByFilter } # Verify parent object parameter set also works - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context - $computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -Filter $filter -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -Filter $filter -BatchContext $context Assert-AreEqual $matches $computeNodes.Length foreach($node in $computeNodes) @@ -72,13 +72,13 @@ function Test-ListComputeNodesWithMaxCount param([string]$accountName, [string]$poolId, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -MaxCount $maxCount -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $computeNodes.Length # Verify parent object parameter set also works - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context - $computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -MaxCount $maxCount -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $computeNodes.Length } @@ -92,27 +92,27 @@ function Test-ListAllComputeNodes param([string]$accountName, [string]$poolId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $computeNodes = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -PoolId $poolId -BatchContext $context Assert-AreEqual $count $computeNodes.Length # Verify parent object parameter set also works - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context - $computeNodes = Get-AzureRMBatchComputeNode_ST -Pool $pool -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context + $computeNodes = Get-AzureBatchComputeNode_ST -Pool $pool -BatchContext $context Assert-AreEqual $count $computeNodes.Length } <# .SYNOPSIS -Tests piping Get-AzureRMBatchPool into Get-AzureRMBatchComputeNode +Tests piping Get-AzureBatchPool into Get-AzureBatchComputeNode #> function Test-ListComputeNodePipeline { param([string]$accountName, [string]$poolId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $computeNodes = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Get-AzureRMBatchComputeNode_ST -BatchContext $context + $computeNodes = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Get-AzureBatchComputeNode_ST -BatchContext $context Assert-AreEqual $count $computeNodes.Count } @@ -131,14 +131,14 @@ function Test-RebootComputeNode if ($usePipeline -eq '1') { - Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Restart-AzureRMBatchComputeNode_ST -RebootOption $rebootOption -BatchContext $context + Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Restart-AzureBatchComputeNode_ST -RebootOption $rebootOption -BatchContext $context } else { - Restart-AzureRMBatchComputeNode_ST $poolId $computeNodeId -RebootOption $rebootOption -BatchContext $context + Restart-AzureBatchComputeNode_ST $poolId $computeNodeId -RebootOption $rebootOption -BatchContext $context } - $computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context Assert-AreEqual 'Rebooting' $computeNode.State } @@ -157,14 +157,14 @@ function Test-ReimageComputeNode if ($usePipeline -eq '1') { - Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Reset-AzureRMBatchComputeNode_ST -ReimageOption $reimageOption -BatchContext $context + Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Reset-AzureBatchComputeNode_ST -ReimageOption $reimageOption -BatchContext $context } else { - Reset-AzureRMBatchComputeNode_ST $poolId $computeNodeId -ReimageOption $reimageOption -BatchContext $context + Reset-AzureBatchComputeNode_ST $poolId $computeNodeId -ReimageOption $reimageOption -BatchContext $context } - $computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context Assert-AreEqual 'Reimaging' $computeNode.State } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs index 23b6e5438ec2..6f38bbd48e02 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs @@ -95,7 +95,7 @@ public void TestDeleteComputeNodeUser() } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.New, "AzureRMBatchComputeNodeUser_ST")] + [Cmdlet(VerbsCommon.New, "AzureBatchComputeNodeUser_ST")] public class NewBatchComputeNodeUserScenarioTestCommand : NewBatchComputeNodeUserCommand { protected override void ProcessRecord() @@ -105,7 +105,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchComputeNodeUser_ST")] + [Cmdlet(VerbsCommon.Remove, "AzureBatchComputeNodeUser_ST")] public class RemoveBatchComputeNodeUserScenarioTestCommand : RemoveBatchComputeNodeUserCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 index a9e35fecb6f9..9c6d105662c9 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 @@ -27,18 +27,18 @@ function Test-CreateComputeNodeUser if ($usePipeline -eq '1') { $expiryTime = New-Object DateTime -ArgumentList @(2020,01,01) - $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context - $computeNode | New-AzureRMBatchComputeNodeUser_ST -Name $userName -Password $password -ExpiryTime $expiryTime -IsAdmin -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context + $computeNode | New-AzureBatchComputeNodeUser_ST -Name $userName -Password $password -ExpiryTime $expiryTime -IsAdmin -BatchContext $context } else { - New-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Password $password -BatchContext $context + New-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Password $password -BatchContext $context } # Verify that a user was created # There is currently no Get/List user API, so verify by calling the delete operation. # If the user account was created, it will succeed; otherwsie, it will throw a 404 error. - Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context + Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context } <# @@ -51,9 +51,9 @@ function Test-DeleteComputeNodeUser $context = Get-AzureRMBatchAccountKeys -Name $accountName - Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context + Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context # Verify the user was deleted # There is currently no Get/List user API, so try to delete the user again and verify that it fails. - Assert-Throws { Remove-AzureRMBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context } + Assert-Throws { Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs index e9bd1e607f8e..f082b98bc126 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.cs @@ -446,7 +446,7 @@ public void TestGetRemoteDesktopProtocolFilePipeline() } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.Get, "AzureRMBatchNodeFile_ST", DefaultParameterSetName = ComputeNodeAndIdParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchNodeFile_ST", DefaultParameterSetName = ComputeNodeAndIdParameterSet)] public class GetBatchNodeFileScenarioTestCommand : GetBatchNodeFileCommand { protected override void ProcessRecord() @@ -456,7 +456,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Get, "AzureRMBatchNodeFileContent_ST")] + [Cmdlet(VerbsCommon.Get, "AzureBatchNodeFileContent_ST")] public class GetBatchNodeFileContentScenarioTestCommand : GetBatchNodeFileContentCommand { protected override void ProcessRecord() @@ -466,7 +466,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Get, "AzureRMBatchRemoteDesktopProtocolFile_ST")] + [Cmdlet(VerbsCommon.Get, "AzureBatchRemoteDesktopProtocolFile_ST")] public class GetBatchRemoteDesktopProtocolFileScenarioTestCommand : GetBatchRemoteDesktopProtocolFileCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.ps1 index 010e9d3f206b..876e98344035 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/FileTests.ps1 @@ -21,7 +21,7 @@ function Test-GetNodeFileByTaskByName param([string]$accountName, [string]$jobId, [string]$taskId, [string]$nodeFileName) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFile = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context + $nodeFile = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context Assert-AreEqual $nodeFileName $nodeFile.Name } @@ -37,7 +37,7 @@ function Test-ListNodeFilesByTaskByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "startswith(name,'" + "$nodeFilePrefix" + "')" - $nodeFiles = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -BatchContext $context Assert-AreEqual $matches $nodeFiles.Length foreach($nodeFile in $nodeFiles) @@ -46,8 +46,8 @@ function Test-ListNodeFilesByTaskByFilter } # Verify parent object parameter set also works - $task = Get-AzureRMBatchTask_ST $jobId $taskId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -Task $task -Filter $filter -BatchContext $context + $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -Task $task -Filter $filter -BatchContext $context Assert-AreEqual $matches $nodeFiles.Length foreach($nodeFile in $nodeFiles) @@ -65,13 +65,13 @@ function Test-ListNodeFilesByTaskWithMaxCount param([string]$accountName, [string]$jobId, [string]$taskId, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFiles = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -MaxCount $maxCount -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $nodeFiles.Length # Verify parent object parameter set also works - $task = Get-AzureRMBatchTask_ST $jobId $taskId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -Task $task -MaxCount $maxCount -BatchContext $context + $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -Task $task -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $nodeFiles.Length } @@ -86,14 +86,14 @@ function Test-ListNodeFilesByTaskRecursive $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "startswith(name,'wd')" - $nodeFiles = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -BatchContext $context # Only the directory itself is returned Assert-AreEqual 1 $nodeFiles.Length Assert-True { $nodeFiles[0].IsDirectory } # Verify the new file is returned when using the Recursive switch - $nodeFiles = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -Recursive -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $filter -Recursive -BatchContext $context Assert-AreEqual 2 $nodeFiles.Length $file = $nodeFiles | Where-Object { $_.IsDirectory -eq $false } @@ -109,13 +109,13 @@ function Test-ListAllNodeFilesByTask param([string]$accountName, [string] $jobId, [string]$taskId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFiles = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $null -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Filter $null -BatchContext $context Assert-AreEqual $count $nodeFiles.Length # Verify parent object parameter set also works - $task = Get-AzureRMBatchTask_ST $jobId $taskId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -Task $task -BatchContext $context + $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -Task $task -BatchContext $context Assert-AreEqual $count $nodeFiles.Length } @@ -131,11 +131,11 @@ function Test-ListNodeFileByTaskPipeline $context = Get-AzureRMBatchAccountKeys -Name $accountName # Get Task into Get Node File - $nodeFiles = Get-AzureRMBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context | Get-AzureRMBatchNodeFile_ST -BatchContext $context + $nodeFiles = Get-AzureBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context | Get-AzureBatchNodeFile_ST -BatchContext $context Assert-AreEqual $count $nodeFiles.Length # Get Job into Get Task into Get Node file - $nodeFiles = Get-AzureRMBatchJob_ST $jobId -BatchContext $context | Get-AzureRMBatchTask_ST -BatchContext $context | Get-AzureRMBatchNodeFile_ST -BatchContext $context + $nodeFiles = Get-AzureBatchJob_ST $jobId -BatchContext $context | Get-AzureBatchTask_ST -BatchContext $context | Get-AzureBatchNodeFile_ST -BatchContext $context Assert-AreEqual $count $nodeFiles.Length } @@ -152,7 +152,7 @@ function Test-GetNodeFileContentByTaskByName try { - Get-AzureRMBatchNodeFileContent_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context -DestinationStream $stream + Get-AzureBatchNodeFileContent_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -184,8 +184,8 @@ function Test-GetNodeFileContentByTaskPipeline try { - $nodeFile = Get-AzureRMBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context - $nodeFile | Get-AzureRMBatchNodeFileContent_ST -BatchContext $context -DestinationStream $stream + $nodeFile = Get-AzureBatchNodeFile_ST -JobId $jobId -TaskId $taskId -Name $nodeFileName -BatchContext $context + $nodeFile | Get-AzureBatchNodeFileContent_ST -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -213,12 +213,12 @@ function Test-GetNodeFileByComputeNodeByName param([string]$accountName, [string]$poolId, [string]$computeNodeId, [string]$nodeFileName) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFile = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context + $nodeFile = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context Assert-AreEqual $nodeFileName $nodeFile.Name # Verify positional parameters also work - $nodeFile = Get-AzureRMBatchNodeFile_ST $poolId $computeNodeId $nodeFileName -BatchContext $context + $nodeFile = Get-AzureBatchNodeFile_ST $poolId $computeNodeId $nodeFileName -BatchContext $context Assert-AreEqual $nodeFileName $nodeFile.Name } @@ -234,7 +234,7 @@ function Test-ListNodeFilesByComputeNodeByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "startswith(name,'" + "$nodeFilePrefix" + "')" - $nodeFiles = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -BatchContext $context Assert-AreEqual $matches $nodeFiles.Length foreach($nodeFile in $nodeFiles) @@ -243,8 +243,8 @@ function Test-ListNodeFilesByComputeNodeByFilter } # Verify parent object parameter set also works - $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -ComputeNode $computeNode -Filter $filter -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -ComputeNode $computeNode -Filter $filter -BatchContext $context Assert-AreEqual $matches $nodeFiles.Length foreach($nodeFile in $nodeFiles) @@ -262,13 +262,13 @@ function Test-ListNodeFilesByComputeNodeWithMaxCount param([string]$accountName, [string]$poolId, [string]$computeNodeId, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFiles = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -MaxCount $maxCount -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $nodeFiles.Length # Verify parent object parameter set also works - $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -ComputeNode $computeNode -MaxCount $maxCount -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -ComputeNode $computeNode -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $nodeFiles.Length } @@ -283,14 +283,14 @@ function Test-ListNodeFilesByComputeNodeRecursive $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "startswith(name,'" + "$startupFolder" + "')" - $nodeFiles = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -BatchContext $context # Only the directory itself is returned Assert-AreEqual 1 $nodeFiles.Length Assert-True { $nodeFiles[0].IsDirectory } # Verify the start task node files are returned when using the Recursive switch - $nodeFiles = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -Recursive -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Filter $filter -Recursive -BatchContext $context Assert-AreEqual $recursiveCount $nodeFiles.Length $files = $nodeFiles | Where-Object { $_.Name.StartsWith("startup\st") -eq $true } @@ -306,13 +306,13 @@ function Test-ListAllNodeFilesByComputeNode param([string]$accountName, [string]$poolId, [string] $computeNodeId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $nodeFiles = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -BatchContext $context Assert-AreEqual $count $nodeFiles.Length # Verify parent object parameter set also works - $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context - $nodeFiles = Get-AzureRMBatchNodeFile_ST -ComputeNode $computeNode -BatchContext $context + $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context + $nodeFiles = Get-AzureBatchNodeFile_ST -ComputeNode $computeNode -BatchContext $context Assert-AreEqual $count $nodeFiles.Length } @@ -328,7 +328,7 @@ function Test-ListNodeFileByComputeNodePipeline $context = Get-AzureRMBatchAccountKeys -Name $accountName # Get Compute Node into Get Node File - $nodeFiles = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context | Get-AzureRMBatchNodeFile_ST -BatchContext $context + $nodeFiles = Get-AzureBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context | Get-AzureBatchNodeFile_ST -BatchContext $context Assert-AreEqual $count $nodeFiles.Length } @@ -345,7 +345,7 @@ function Test-GetNodeFileContentByComputeNodeByName try { - Get-AzureRMBatchNodeFileContent_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context -DestinationStream $stream + Get-AzureBatchNodeFileContent_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -367,7 +367,7 @@ function Test-GetNodeFileContentByComputeNodeByName $stream = New-Object System.IO.MemoryStream try { - Get-AzureRMBatchNodeFileContent_ST $poolId $computeNodeId $nodeFileName -BatchContext $context -DestinationStream $stream + Get-AzureBatchNodeFileContent_ST $poolId $computeNodeId $nodeFileName -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -399,8 +399,8 @@ function Test-GetNodeFileContentByComputeNodePipeline try { - $nodeFile = Get-AzureRMBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context - $nodeFile | Get-AzureRMBatchNodeFileContent_ST -BatchContext $context -DestinationStream $stream + $nodeFile = Get-AzureBatchNodeFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $nodeFileName -BatchContext $context + $nodeFile | Get-AzureBatchNodeFileContent_ST -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -433,7 +433,7 @@ function Test-GetRDPFileById try { - Get-AzureRMBatchRemoteDesktopProtocolFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -BatchContext $context -DestinationStream $stream + Get-AzureBatchRemoteDesktopProtocolFile_ST -PoolId $poolId -ComputeNodeId $computeNodeId -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -455,7 +455,7 @@ function Test-GetRDPFileById $stream = New-Object System.IO.MemoryStream try { - Get-AzureRMBatchRemoteDesktopProtocolFile_ST $poolId $computeNodeId -BatchContext $context -DestinationStream $stream + Get-AzureBatchRemoteDesktopProtocolFile_ST $poolId $computeNodeId -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream @@ -488,8 +488,8 @@ function Test-GetRDPFilePipeline try { - $computeNode = Get-AzureRMBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context - $computeNode | Get-AzureRMBatchRemoteDesktopProtocolFile_ST -BatchContext $context -DestinationStream $stream + $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Id $computeNodeId -BatchContext $context + $computeNode | Get-AzureBatchRemoteDesktopProtocolFile_ST -BatchContext $context -DestinationStream $stream $stream.Position = 0 $sr = New-Object System.IO.StreamReader $stream diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs index 56c263f5354e..48042073901e 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs @@ -243,7 +243,7 @@ private void TestTerminateJobSchedule(bool usePipeline) } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.Get, "AzureRMBatchJobSchedule_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchJobSchedule_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] public class GetBatchJobScheduleScenarioTestCommand : GetBatchJobScheduleCommand { protected override void ProcessRecord() @@ -253,7 +253,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.New, "AzureRMBatchJobSchedule_ST")] + [Cmdlet(VerbsCommon.New, "AzureBatchJobSchedule_ST")] public class NewBatchJobScheduleScenarioTestCommand : NewBatchJobScheduleCommand { protected override void ProcessRecord() @@ -263,7 +263,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchJobSchedule_ST")] + [Cmdlet(VerbsCommon.Remove, "AzureBatchJobSchedule_ST")] public class RemoveBatchJobScheduleScenarioTestCommand : RemoveBatchJobScheduleCommand { protected override void ProcessRecord() @@ -273,7 +273,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Enable, "AzureRMBatchJobSchedule_ST")] + [Cmdlet(VerbsLifecycle.Enable, "AzureBatchJobSchedule_ST")] public class EnableBatchJobScheduleScenarioTestCommand : EnableBatchJobScheduleCommand { protected override void ProcessRecord() @@ -283,7 +283,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Disable, "AzureRMBatchJobSchedule_ST")] + [Cmdlet(VerbsLifecycle.Disable, "AzureBatchJobSchedule_ST")] public class DisableBatchJobScheduleScenarioTestCommand : DisableBatchJobScheduleCommand { protected override void ProcessRecord() @@ -293,7 +293,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Stop, "AzureRMBatchJobSchedule_ST")] + [Cmdlet(VerbsLifecycle.Stop, "AzureBatchJobSchedule_ST")] public class StopBatchJobScheduleScenarioTestCommand : StopBatchJobScheduleCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1 index e56ad0115ba5..3b6302c8d25b 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1 @@ -32,8 +32,8 @@ function Test-NewJobSchedule $jobSpec1.PoolInformation = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation $jobSpec1.PoolInformation.PoolId = $poolId = "testPool" $schedule1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSSchedule - New-AzureRMBatchJobSchedule_ST -Id $jsId1 -JobSpecification $jobSpec1 -Schedule $schedule1 -BatchContext $context - $jobSchedule1 = Get-AzureRMBatchJobSchedule_ST -Id $jsId1 -BatchContext $context + New-AzureBatchJobSchedule_ST -Id $jsId1 -JobSpecification $jobSpec1 -Schedule $schedule1 -BatchContext $context + $jobSchedule1 = Get-AzureBatchJobSchedule_ST -Id $jsId1 -BatchContext $context # Verify created job schedule matches expectations Assert-AreEqual $jsId1 $jobSchedule1.Id @@ -180,9 +180,9 @@ function Test-NewJobSchedule $displayName = "displayName" - New-AzureRMBatchJobSchedule_ST -Id $jsId2 -DisplayName $displayName -Schedule $schedule2 -JobSpecification $jobSpec2 -Metadata $metadata -BatchContext $context + New-AzureBatchJobSchedule_ST -Id $jsId2 -DisplayName $displayName -Schedule $schedule2 -JobSpecification $jobSpec2 -Metadata $metadata -BatchContext $context - $jobSchedule2 = Get-AzureRMBatchJobSchedule_ST -Id $jsId2 -BatchContext $context + $jobSchedule2 = Get-AzureBatchJobSchedule_ST -Id $jsId2 -BatchContext $context # Verify created job schedule matches expectations Assert-AreEqual $jsId2 $jobSchedule2.Id @@ -262,8 +262,8 @@ function Test-NewJobSchedule } finally { - Remove-AzureRMBatchJobSchedule_ST -Id $jsId1 -Force -BatchContext $context - Remove-AzureRMBatchJobSchedule_ST -Id $jsId2 -Force -BatchContext $context + Remove-AzureBatchJobSchedule_ST -Id $jsId1 -Force -BatchContext $context + Remove-AzureBatchJobSchedule_ST -Id $jsId2 -Force -BatchContext $context } } @@ -276,7 +276,7 @@ function Test-GetJobScheduleById param([string]$accountName, [string]$jsId) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobSchedule = Get-AzureRMBatchJobSchedule_ST -Id $jsId -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST -Id $jsId -BatchContext $context Assert-AreEqual $jsId $jobSchedule.Id } @@ -291,7 +291,7 @@ function Test-ListJobSchedulesByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $jsFilter = "startswith(id,'" + "$jsPrefix" + "')" - $jobSchedules = Get-AzureRMBatchJobSchedule_ST -Filter $jsFilter -BatchContext $context + $jobSchedules = Get-AzureBatchJobSchedule_ST -Filter $jsFilter -BatchContext $context Assert-AreEqual $matches $jobSchedules.Length foreach($jobSchedule in $jobSchedules) @@ -309,7 +309,7 @@ function Test-ListJobSchedulesWithMaxCount param([string]$accountName, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobSchedules = Get-AzureRMBatchJobSchedule_ST -MaxCount $maxCount -BatchContext $context + $jobSchedules = Get-AzureBatchJobSchedule_ST -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $jobSchedules.Length } @@ -323,7 +323,7 @@ function Test-ListAllJobSchedules param([string]$accountName, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobSchedules = Get-AzureRMBatchJobSchedule_ST -BatchContext $context + $jobSchedules = Get-AzureBatchJobSchedule_ST -BatchContext $context Assert-AreEqual $count $jobSchedules.Length } @@ -339,20 +339,20 @@ function Test-DeleteJobSchedule $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the job schedule exists - $jobSchedules = Get-AzureRMBatchJobSchedule_ST -BatchContext $context + $jobSchedules = Get-AzureBatchJobSchedule_ST -BatchContext $context Assert-AreEqual 1 $jobSchedules.Count if ($usePipeline -eq '1') { - Get-AzureRMBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context | Remove-AzureRMBatchJobSchedule_ST -Force -BatchContext $context + Get-AzureBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context | Remove-AzureBatchJobSchedule_ST -Force -BatchContext $context } else { - Remove-AzureRMBatchJobSchedule_ST -Id $jobScheduleId -Force -BatchContext $context + Remove-AzureBatchJobSchedule_ST -Id $jobScheduleId -Force -BatchContext $context } # Verify the job schedule was deleted - $jobSchedules = Get-AzureRMBatchJobSchedule_ST -BatchContext $context + $jobSchedules = Get-AzureBatchJobSchedule_ST -BatchContext $context Assert-True { $jobSchedules -eq $null -or $jobSchedules[0].State.ToString().ToLower() -eq 'deleting' } } @@ -367,28 +367,28 @@ function Test-DisableAndEnableJobSchedule $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the job schedule is Active - $jobSchedule = Get-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context Assert-AreEqual 'Active' $jobSchedule.State - Disable-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + Disable-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context # Verify the job schedule was Disabled - $jobSchedule = Get-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context Assert-AreEqual 'Disabled' $jobSchedule.State - Enable-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + Enable-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context # Verify the job schedule is again Active - $jobSchedule = Get-AzureRMBatchJobSchedule_ST -Filter "id eq '$jobScheduleId'" -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST -Filter "id eq '$jobScheduleId'" -BatchContext $context Assert-AreEqual 'Active' $jobSchedule.State # Verify using the pipeline - $jobSchedule | Disable-AzureRMBatchJobSchedule_ST -BatchContext $context - $jobSchedule = Get-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + $jobSchedule | Disable-AzureBatchJobSchedule_ST -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context Assert-AreEqual 'Disabled' $jobSchedule.State - $jobSchedule | Enable-AzureRMBatchJobSchedule_ST -BatchContext $context - $jobSchedule = Get-AzureRMBatchJobSchedule_ST -Filter "id eq '$jobScheduleId'" -BatchContext $context + $jobSchedule | Enable-AzureBatchJobSchedule_ST -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST -Filter "id eq '$jobScheduleId'" -BatchContext $context Assert-AreEqual 'Active' $jobSchedule.State } @@ -404,14 +404,14 @@ function Test-TerminateJobSchedule if ($usePipeline -eq '1') { - Get-AzureRMBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context | Stop-AzureRMBatchJobSchedule_ST -BatchContext $context + Get-AzureBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context | Stop-AzureBatchJobSchedule_ST -BatchContext $context } else { - Stop-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + Stop-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context } # Verify the job schedule was terminated - $jobSchedule = Get-AzureRMBatchJobSchedule_ST $jobScheduleId -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context Assert-True { ($jobSchedule.State.ToString().ToLower() -eq 'terminating') -or ($jobSchedule.State.ToString().ToLower() -eq 'completed') } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs index dbb43cc6924e..c2150acd1050 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs @@ -280,7 +280,7 @@ private void TestTerminateJob(bool usePipeline) } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.New, "AzureRMBatchJob_ST")] + [Cmdlet(VerbsCommon.New, "AzureBatchJob_ST")] public class NewBatchJobScenarioTestCommand : NewBatchJobCommand { protected override void ProcessRecord() @@ -290,7 +290,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Get, "AzureRMBatchJob_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchJob_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] public class GetBatchJobScenarioTestCommand : GetBatchJobCommand { protected override void ProcessRecord() @@ -300,7 +300,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchJob_ST")] + [Cmdlet(VerbsCommon.Remove, "AzureBatchJob_ST")] public class RemoveBatchJobScenarioTestCommand : RemoveBatchJobCommand { protected override void ProcessRecord() @@ -310,7 +310,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Enable, "AzureRMBatchJob_ST")] + [Cmdlet(VerbsLifecycle.Enable, "AzureBatchJob_ST")] public class EnableBatchJobScenarioTestCommand : EnableBatchJobCommand { protected override void ProcessRecord() @@ -320,7 +320,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Disable, "AzureRMBatchJob_ST")] + [Cmdlet(VerbsLifecycle.Disable, "AzureBatchJob_ST")] public class DisableBatchJobScenarioTestCommand : DisableBatchJobCommand { protected override void ProcessRecord() @@ -330,7 +330,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Stop, "AzureRMBatchJob_ST")] + [Cmdlet(VerbsLifecycle.Stop, "AzureBatchJob_ST")] public class StopBatchJobScenarioTestCommand : StopBatchJobCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 index c2656a99d130..e57a62071759 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 @@ -30,8 +30,8 @@ function Test-NewJob # Create a simple job $poolInformation1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation $poolInformation1.PoolId = $poolId = "testPool" - New-AzureRMBatchJob_ST -Id $jobId1 -PoolInformation $poolInformation1 -BatchContext $context - $job1 = Get-AzureRMBatchJob_ST -Id $jobId1 -BatchContext $context + New-AzureBatchJob_ST -Id $jobId1 -PoolInformation $poolInformation1 -BatchContext $context + $job1 = Get-AzureBatchJob_ST -Id $jobId1 -BatchContext $context # Verify created job matches expectations Assert-AreEqual $jobId1 $job1.Id @@ -147,9 +147,9 @@ function Test-NewJob $displayName = "displayName" $priority = 1 - New-AzureRMBatchJob_ST -Id $jobId2 -DisplayName $displayName -CommonEnvironmentSettings $commonEnvSettings -Constraints $jobConstraints -JobManagerTask $jobMgr -JobPreparationTask $jobPrep -JobReleaseTask $jobRelease -PoolInformation $poolInformation2 -Metadata $metadata -Priority $priority -BatchContext $context + New-AzureBatchJob_ST -Id $jobId2 -DisplayName $displayName -CommonEnvironmentSettings $commonEnvSettings -Constraints $jobConstraints -JobManagerTask $jobMgr -JobPreparationTask $jobPrep -JobReleaseTask $jobRelease -PoolInformation $poolInformation2 -Metadata $metadata -Priority $priority -BatchContext $context - $job2 = Get-AzureRMBatchJob_ST -Id $jobId2 -BatchContext $context + $job2 = Get-AzureBatchJob_ST -Id $jobId2 -BatchContext $context # Verify created job matches expectations Assert-AreEqual $jobId2 $job2.Id @@ -221,8 +221,8 @@ function Test-NewJob } finally { - Remove-AzureRMBatchJob_ST -Id $jobId1 -Force -BatchContext $context - Remove-AzureRMBatchJob_ST -Id $jobId2 -Force -BatchContext $context + Remove-AzureBatchJob_ST -Id $jobId1 -Force -BatchContext $context + Remove-AzureBatchJob_ST -Id $jobId2 -Force -BatchContext $context } } @@ -236,12 +236,12 @@ function Test-GetJobById param([string]$accountName, [string]$jobId) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $job = Get-AzureRMBatchJob_ST -Id $jobId -BatchContext $context + $job = Get-AzureBatchJob_ST -Id $jobId -BatchContext $context Assert-AreEqual $jobId $job.Id # Verify positional parameters also work - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context Assert-AreEqual $jobId $job.Id } @@ -257,7 +257,7 @@ function Test-ListJobsByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "state eq'" + "$state" + "'" - $jobs = Get-AzureRMBatchJob_ST -Filter $filter -BatchContext $context + $jobs = Get-AzureBatchJob_ST -Filter $filter -BatchContext $context Assert-AreEqual $matches $jobs.Length foreach($job in $jobs) @@ -275,7 +275,7 @@ function Test-ListJobsWithMaxCount param([string]$accountName, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobs = Get-AzureRMBatchJob_ST -MaxCount $maxCount -BatchContext $context + $jobs = Get-AzureBatchJob_ST -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $jobs.Length } @@ -289,7 +289,7 @@ function Test-ListAllJobs param([string]$accountName, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobs = Get-AzureRMBatchJob_ST -BatchContext $context + $jobs = Get-AzureBatchJob_ST -BatchContext $context Assert-AreEqual $count $jobs.Length } @@ -303,24 +303,24 @@ function Test-ListJobsUnderSchedule param([string]$accountName, [string]$jobScheduleId, [string]$jobId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $jobSchedule = Get-AzureRMBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context + $jobSchedule = Get-AzureBatchJobSchedule_ST -Id $jobScheduleId -BatchContext $context # Verify that listing jobs works - $allJobs = Get-AzureRMBatchJob_ST -BatchContext $context - $scheduleJobs = Get-AzureRMBatchJob_ST -JobScheduleId $jobSchedule.Id -BatchContext $context + $allJobs = Get-AzureBatchJob_ST -BatchContext $context + $scheduleJobs = Get-AzureBatchJob_ST -JobScheduleId $jobSchedule.Id -BatchContext $context Assert-AreEqual $count $scheduleJobs.Count Assert-True { $scheduleJobs.Count -lt $allJobs.Count } # Verify that pipelining also works - $scheduleJobs = $jobSchedule | Get-AzureRMBatchJob_ST -BatchContext $context + $scheduleJobs = $jobSchedule | Get-AzureBatchJob_ST -BatchContext $context Assert-AreEqual $count $scheduleJobs.Count Assert-True { $scheduleJobs.Count -lt $allJobs.Count } # Verify that filter works $filter = "id eq '" + $jobId + "'" - $job = Get-AzureRMBatchJob_ST -JobScheduleId $jobScheduleId -Filter $filter -BatchContext $context + $job = Get-AzureBatchJob_ST -JobScheduleId $jobScheduleId -Filter $filter -BatchContext $context Assert-AreEqual $jobId $job.Id } @@ -336,20 +336,20 @@ function Test-DeleteJob $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the job exists - $jobs = Get-AzureRMBatchJob_ST -BatchContext $context + $jobs = Get-AzureBatchJob_ST -BatchContext $context Assert-AreEqual 1 $jobs.Count if ($usePipeline -eq '1') { - Get-AzureRMBatchJob_ST -Id $jobId -BatchContext $context | Remove-AzureRMBatchJob_ST -Force -BatchContext $context + Get-AzureBatchJob_ST -Id $jobId -BatchContext $context | Remove-AzureBatchJob_ST -Force -BatchContext $context } else { - Remove-AzureRMBatchJob_ST -Id $jobId -Force -BatchContext $context + Remove-AzureBatchJob_ST -Id $jobId -Force -BatchContext $context } # Verify the job was deleted - $jobs = Get-AzureRMBatchJob_ST -BatchContext $context + $jobs = Get-AzureBatchJob_ST -BatchContext $context Assert-True { $jobs -eq $null -or $jobs[0].State.ToString().ToLower() -eq 'deleting' } } @@ -364,28 +364,28 @@ function Test-DisableAndEnableJob $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the job is Active - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context Assert-AreEqual 'Active' $job.State - Disable-AzureRMBatchJob_ST $jobId Terminate -BatchContext $context + Disable-AzureBatchJob_ST $jobId Terminate -BatchContext $context # Verify the job was Disabled - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context Assert-AreEqual 'Disabled' $job.State - Enable-AzureRMBatchJob_ST $jobId -BatchContext $context + Enable-AzureBatchJob_ST $jobId -BatchContext $context # Verify the job is again active - $job = Get-AzureRMBatchJob_ST -Filter "id eq '$jobId'" -BatchContext $context + $job = Get-AzureBatchJob_ST -Filter "id eq '$jobId'" -BatchContext $context Assert-AreEqual 'Active' $job.State # Verify using the pipeline - $job | Disable-AzureRMBatchJob_ST -DisableJobOption Terminate -BatchContext $context - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context + $job | Disable-AzureBatchJob_ST -DisableJobOption Terminate -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context Assert-AreEqual 'Disabled' $job.State - $job | Enable-AzureRMBatchJob_ST -BatchContext $context - $job = Get-AzureRMBatchJob_ST -Filter "id eq '$jobId'" -BatchContext $context + $job | Enable-AzureBatchJob_ST -BatchContext $context + $job = Get-AzureBatchJob_ST -Filter "id eq '$jobId'" -BatchContext $context Assert-AreEqual 'Active' $job.State } @@ -402,15 +402,15 @@ function Test-TerminateJob if ($usePipeline -eq '1') { - Get-AzureRMBatchJob_ST -Id $jobId -BatchContext $context | Stop-AzureRMBatchJob_ST -TerminateReason $terminateReason -BatchContext $context + Get-AzureBatchJob_ST -Id $jobId -BatchContext $context | Stop-AzureBatchJob_ST -TerminateReason $terminateReason -BatchContext $context } else { - Stop-AzureRMBatchJob_ST $jobId $terminateReason -BatchContext $context + Stop-AzureBatchJob_ST $jobId $terminateReason -BatchContext $context } # Verify the job was terminated and that the terminate reason was set - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context Assert-True { ($job.State.ToString().ToLower() -eq 'terminating') -or ($job.State.ToString().ToLower() -eq 'completed') } Assert-AreEqual $terminateReason $job.ExecutionInformation.TerminateReason } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs index f8a575179900..b974f62384ba 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs @@ -421,7 +421,7 @@ private void TestChangeOSVersion(bool usePipeline) } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.Get, "AzureRMBatchPool_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchPool_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] public class GetBatchPoolScenarioTestCommand : GetBatchPoolCommand { protected override void ProcessRecord() @@ -431,7 +431,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.New, "AzureRMBatchPool_ST", DefaultParameterSetName = TargetDedicatedParameterSet)] + [Cmdlet(VerbsCommon.New, "AzureBatchPool_ST", DefaultParameterSetName = TargetDedicatedParameterSet)] public class NewBatchPoolScenarioTestCommand : NewBatchPoolCommand { protected override void ProcessRecord() @@ -441,7 +441,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchPool_ST")] + [Cmdlet(VerbsCommon.Remove, "AzureBatchPool_ST")] public class RemoveBatchPoolScenarioTestCommand : RemoveBatchPoolCommand { protected override void ProcessRecord() @@ -451,7 +451,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Start, "AzureRMBatchPoolResize_ST")] + [Cmdlet(VerbsLifecycle.Start, "AzureBatchPoolResize_ST")] public class StartBatchPoolResizeScenarioTestCommand : StartBatchPoolResizeCommand { protected override void ProcessRecord() @@ -461,7 +461,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Stop, "AzureRMBatchPoolResize_ST")] + [Cmdlet(VerbsLifecycle.Stop, "AzureBatchPoolResize_ST")] public class StopBatchPoolResizeScenarioTestCommand : StopBatchPoolResizeCommand { protected override void ProcessRecord() @@ -471,7 +471,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Enable, "AzureRMBatchAutoScale_ST")] + [Cmdlet(VerbsLifecycle.Enable, "AzureBatchAutoScale_ST")] public class EnableBatchAutoScaleScenarioTestCommand : EnableBatchAutoScaleCommand { protected override void ProcessRecord() @@ -481,7 +481,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Disable, "AzureRMBatchAutoScale_ST")] + [Cmdlet(VerbsLifecycle.Disable, "AzureBatchAutoScale_ST")] public class DisableBatchAutoScaleScenarioTestCommand : DisableBatchAutoScaleCommand { protected override void ProcessRecord() @@ -491,7 +491,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsDiagnostic.Test, "AzureRMBatchAutoScale_ST")] + [Cmdlet(VerbsDiagnostic.Test, "AzureBatchAutoScale_ST")] public class TestBatchAutoScaleScenarioTestCommand : TestBatchAutoScaleCommand { protected override void ProcessRecord() @@ -501,7 +501,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Set, "AzureRMBatchPoolOSVersion_ST")] + [Cmdlet(VerbsCommon.Set, "AzureBatchPoolOSVersion_ST")] public class SetBatchPoolOSVersionScenarioTestCommand : SetBatchPoolOSVersionCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 index 02e241281c6d..5152c9caa167 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 @@ -33,8 +33,8 @@ function Test-NewPool $targetDedicated = 1 $resizeTimeout = ([TimeSpan]::FromMinutes(10)) $vmSize = "small" - New-AzureRMBatchPool_ST $poolId1 -OSFamily $osFamily -TargetOSVersion $targetOSVersion -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -ResizeTimeout $resizeTimeout -BatchContext $context - $pool1 = Get-AzureRMBatchPool_ST -Id $poolId1 -BatchContext $context + New-AzureBatchPool_ST $poolId1 -OSFamily $osFamily -TargetOSVersion $targetOSVersion -TargetDedicated $targetDedicated -VirtualMachineSize $vmSize -ResizeTimeout $resizeTimeout -BatchContext $context + $pool1 = Get-AzureBatchPool_ST -Id $poolId1 -BatchContext $context # Verify created pool matches expectations Assert-AreEqual $poolId1 $pool1.Id @@ -69,9 +69,9 @@ function Test-NewPool $displayName = "displayName" - New-AzureRMBatchPool_ST -Id $poolId2 -VirtualMachineSize $vmSize -OSFamily $osFamily -TargetOSVersion $targetOSVersion -DisplayName $displayName -MaxTasksPerComputeNode $maxTasksPerComputeNode -AutoScaleFormula $autoScaleFormula -StartTask $startTask -TaskSchedulingPolicy $schedulingPolicy -InterComputeNodeCommunicationEnabled -Metadata $metadata -BatchContext $context + New-AzureBatchPool_ST -Id $poolId2 -VirtualMachineSize $vmSize -OSFamily $osFamily -TargetOSVersion $targetOSVersion -DisplayName $displayName -MaxTasksPerComputeNode $maxTasksPerComputeNode -AutoScaleFormula $autoScaleFormula -StartTask $startTask -TaskSchedulingPolicy $schedulingPolicy -InterComputeNodeCommunicationEnabled -Metadata $metadata -BatchContext $context - $pool2 = Get-AzureRMBatchPool_ST -Id $poolId2 -BatchContext $context + $pool2 = Get-AzureBatchPool_ST -Id $poolId2 -BatchContext $context # Verify created pool matches expectations Assert-AreEqual $poolId2 $pool2.Id @@ -98,8 +98,8 @@ function Test-NewPool } finally { - Remove-AzureRMBatchPool_ST -Id $poolId1 -Force -BatchContext $context - Remove-AzureRMBatchPool_ST -Id $poolId2 -Force -BatchContext $context + Remove-AzureBatchPool_ST -Id $poolId1 -Force -BatchContext $context + Remove-AzureBatchPool_ST -Id $poolId2 -Force -BatchContext $context } } @@ -112,7 +112,7 @@ function Test-GetPoolById param([string]$accountName, [string]$poolId) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-AreEqual $poolId $pool.Id } @@ -127,7 +127,7 @@ function Test-ListPoolsByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $poolFilter = "startswith(id,'" + "$poolPrefix" + "')" - $pools = Get-AzureRMBatchPool_ST -Filter $poolFilter -BatchContext $context + $pools = Get-AzureBatchPool_ST -Filter $poolFilter -BatchContext $context Assert-AreEqual $matches $pools.Length foreach($pool in $pools) @@ -145,7 +145,7 @@ function Test-ListPoolsWithMaxCount param([string]$accountName, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $pools = Get-AzureRMBatchPool_ST -MaxCount $maxCount -BatchContext $context + $pools = Get-AzureBatchPool_ST -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $pools.Length } @@ -159,7 +159,7 @@ function Test-ListAllPools param([string]$accountName, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $pools = Get-AzureRMBatchPool_ST -BatchContext $context + $pools = Get-AzureBatchPool_ST -BatchContext $context Assert-AreEqual $count $pools.Length } @@ -175,21 +175,21 @@ function Test-DeletePool $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the pool exists - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-AreEqual $poolId $pool.Id if ($usePipeline -eq '1') { - Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Remove-AzureRMBatchPool_ST -Force -BatchContext $context + Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Remove-AzureBatchPool_ST -Force -BatchContext $context } else { - Remove-AzureRMBatchPool_ST -Id $poolId -Force -BatchContext $context + Remove-AzureBatchPool_ST -Id $poolId -Force -BatchContext $context } # Verify the pool was deleted. Use the OData filter since the GetPool API will cause a 404 if the pool isn't found. $filter = "id eq '" + $poolId + "'" - $pool = Get-AzureRMBatchPool_ST -Filter $filter -BatchContext $context + $pool = Get-AzureBatchPool_ST -Filter $filter -BatchContext $context Assert-True { $pool -eq $null -or $pool.State.ToString().ToLower() -eq 'deleting' } } @@ -205,14 +205,14 @@ function Test-ResizePoolById $context = Get-AzureRMBatchAccountKeys -Name $accountName # Get the initial TargetDedicated count - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context $initialTargetDedicated = $pool.TargetDedicated $newTargetDedicated = $initialTargetDedicated + 1 - Start-AzureRMBatchPoolResize_ST -Id $poolId -TargetDedicated $newTargetDedicated -BatchContext $context + Start-AzureBatchPoolResize_ST -Id $poolId -TargetDedicated $newTargetDedicated -BatchContext $context # Verify the TargetDedicated property was updated - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context Assert-AreEqual $newTargetDedicated $pool.TargetDedicated } @@ -227,14 +227,14 @@ function Test-ResizePoolByPipeline $context = Get-AzureRMBatchAccountKeys -Name $accountName # Get the initial TargetDedicated count - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context $initialTargetDedicated = $pool.TargetDedicated $newTargetDedicated = $initialTargetDedicated - 1 - $pool | Start-AzureRMBatchPoolResize_ST -TargetDedicated $newTargetDedicated -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption ([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $context + $pool | Start-AzureBatchPoolResize_ST -TargetDedicated $newTargetDedicated -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption ([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $context # Verify the TargetDedicated property was updated - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context Assert-AreEqual $newTargetDedicated $pool.TargetDedicated } @@ -249,15 +249,15 @@ function Test-StopResizePoolById $context = Get-AzureRMBatchAccountKeys $accountName # Start a resize and then stop it - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context $initialTargetDedicated = $pool.TargetDedicated $newTargetDedicated = $initialTargetDedicated + 2 - Start-AzureRMBatchPoolResize_ST -Id $poolId -TargetDedicated $newTargetDedicated -BatchContext $context - Stop-AzureRMBatchPoolResize_ST -Id $poolId -BatchContext $context + Start-AzureBatchPoolResize_ST -Id $poolId -TargetDedicated $newTargetDedicated -BatchContext $context + Stop-AzureBatchPoolResize_ST -Id $poolId -BatchContext $context # Verify the AllocationState changed to Stopping - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context Assert-AreEqual 'Stopping' $pool.AllocationState } @@ -272,15 +272,15 @@ function Test-StopResizePoolByPipeline $context = Get-AzureRMBatchAccountKeys -Name $accountName # Start a resize and then stop it - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context $initialTargetDedicated = $pool.TargetDedicated $newTargetDedicated = $initialTargetDedicated + 2 - $pool | Start-AzureRMBatchPoolResize_ST -TargetDedicated $newTargetDedicated -BatchContext $context - $pool | Stop-AzureRMBatchPoolResize_ST -BatchContext $context + $pool | Start-AzureBatchPoolResize_ST -TargetDedicated $newTargetDedicated -BatchContext $context + $pool | Stop-AzureBatchPoolResize_ST -BatchContext $context # Verify the AllocationState changed to Stopping - $pool = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context Assert-AreEqual 'Stopping' $pool.AllocationState } @@ -297,21 +297,21 @@ function Test-EnableAutoScale $formula = '$TargetDedicated=2' # Verify pool starts with autoscale disabled - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-False { $pool.AutoScaleEnabled } if ($usePipeline -eq '1') { - Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Enable-AzureRMBatchAutoScale_ST -AutoScaleFormula $formula -BatchContext $context + Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Enable-AzureBatchAutoScale_ST -AutoScaleFormula $formula -BatchContext $context } else { - Enable-AzureRMBatchAutoScale_ST $poolId $formula -BatchContext $context + Enable-AzureBatchAutoScale_ST $poolId $formula -BatchContext $context } # Verify that autoscale was enabled. # Use a filter because it seems that the recorder sometimes gets confused when two identical URLs are sent too close together - $pool = Get-AzureRMBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context + $pool = Get-AzureBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context Assert-True { $pool.AutoScaleEnabled } } @@ -326,21 +326,21 @@ function Test-DisableAutoScale $context = Get-AzureRMBatchAccountKeys $accountName # Verify pool starts with autoscale enabled - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-True { $pool.AutoScaleEnabled } if ($usePipeline -eq '1') { - Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Disable-AzureRMBatchAutoScale_ST -BatchContext $context + Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Disable-AzureBatchAutoScale_ST -BatchContext $context } else { - Disable-AzureRMBatchAutoScale_ST $poolId -BatchContext $context + Disable-AzureBatchAutoScale_ST $poolId -BatchContext $context } # Verify that autoscale was disabled # Use a filter because it seems that the recorder sometimes gets confused when two identical URLs are sent too close together - $pool = Get-AzureRMBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context + $pool = Get-AzureBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context Assert-False { $pool.AutoScaleEnabled } } @@ -357,16 +357,16 @@ function Test-EvaluateAutoScale $formula = '$TargetDedicated=2' # Verify pool starts with autoscale enabled - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-True { $pool.AutoScaleEnabled } if ($usePipeline -eq '1') { - $evalResult = Get-AzureRMBatchPool_ST -Id $poolId -BatchContext $context | Test-AzureRMBatchAutoScale_ST -AutoScaleFormula $formula -BatchContext $context + $evalResult = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Test-AzureBatchAutoScale_ST -AutoScaleFormula $formula -BatchContext $context } else { - $evalResult = Test-AzureRMBatchAutoScale_ST $poolId $formula -BatchContext $context + $evalResult = Test-AzureBatchAutoScale_ST $poolId $formula -BatchContext $context } # Verify that the evaluation result matches expectation @@ -384,18 +384,18 @@ function Test-ChangeOSVersion $context = Get-AzureRMBatchAccountKeys $accountName # Verify that we start with a different target OS - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-AreNotEqual $targetOSVersion $pool.TargetOSVersion if ($usePipeline -eq '1') { - Get-AzureRMBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context | Set-AzureRMBatchPoolOSVersion_ST -TargetOSVersion $targetOSVersion -BatchContext $context + Get-AzureBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context | Set-AzureBatchPoolOSVersion_ST -TargetOSVersion $targetOSVersion -BatchContext $context } else { - Set-AzureRMBatchPoolOSVersion_ST $poolId $targetOSVersion -BatchContext $context + Set-AzureBatchPoolOSVersion_ST $poolId $targetOSVersion -BatchContext $context } - $pool = Get-AzureRMBatchPool_ST $poolId -BatchContext $context + $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context Assert-AreEqual $targetOSVersion $pool.TargetOSVersion } \ No newline at end of file diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs index 42aaa29ae74d..9292fe5afc09 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs @@ -264,7 +264,7 @@ public void TestTerminateTask() } // Cmdlets that use the HTTP Recorder interceptor for use with scenario tests - [Cmdlet(VerbsCommon.Get, "AzureRMBatchTask_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] + [Cmdlet(VerbsCommon.Get, "AzureBatchTask_ST", DefaultParameterSetName = Constants.ODataFilterParameterSet)] public class GetBatchTaskScenarioTestCommand : GetBatchTaskCommand { protected override void ProcessRecord() @@ -274,7 +274,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.New, "AzureRMBatchTask_ST")] + [Cmdlet(VerbsCommon.New, "AzureBatchTask_ST")] public class NewBatchTaskScenarioTestCommand : NewBatchTaskCommand { protected override void ProcessRecord() @@ -284,7 +284,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchTask_ST")] + [Cmdlet(VerbsCommon.Remove, "AzureBatchTask_ST")] public class RemoveBatchTaskScenarioTestCommand : RemoveBatchTaskCommand { protected override void ProcessRecord() @@ -294,7 +294,7 @@ protected override void ProcessRecord() } } - [Cmdlet(VerbsLifecycle.Stop, "AzureRMBatchTask_ST")] + [Cmdlet(VerbsLifecycle.Stop, "AzureBatchTask_ST")] public class StopBatchTaskScenarioTestCommand : StopBatchTaskCommand { protected override void ProcessRecord() diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1 index 62c7b730e692..38fcc9eaa164 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1 +++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1 @@ -27,8 +27,8 @@ function Test-CreateTask $cmd = "cmd /c dir /s" # Create a simple task and verify pipeline - Get-AzureRMBatchJob_ST -Id $jobId -BatchContext $context | New-AzureRMBatchTask_ST -Id $taskId1 -CommandLine $cmd -BatchContext $context - $task1 = Get-AzureRMBatchTask_ST -JobId $jobId -Id $taskId1 -BatchContext $context + Get-AzureBatchJob_ST -Id $jobId -BatchContext $context | New-AzureBatchTask_ST -Id $taskId1 -CommandLine $cmd -BatchContext $context + $task1 = Get-AzureBatchTask_ST -JobId $jobId -Id $taskId1 -BatchContext $context # Verify created task matches expectations Assert-AreEqual $taskId1 $task1.Id @@ -47,9 +47,9 @@ function Test-CreateTask $envSettings = @{"env1"="value1";"env2"="value2"} - New-AzureRMBatchTask_ST -JobId $jobId -Id $taskId2 -CommandLine $cmd -RunElevated -EnvironmentSettings $envSettings -ResourceFiles $resourceFiles -AffinityInformation $affinityInfo -Constraints $taskConstraints -BatchContext $context + New-AzureBatchTask_ST -JobId $jobId -Id $taskId2 -CommandLine $cmd -RunElevated -EnvironmentSettings $envSettings -ResourceFiles $resourceFiles -AffinityInformation $affinityInfo -Constraints $taskConstraints -BatchContext $context - $task2 = Get-AzureRMBatchTask_ST -JobId $jobId -Id $taskId2 -BatchContext $context + $task2 = Get-AzureBatchTask_ST -JobId $jobId -Id $taskId2 -BatchContext $context # Verify created task matches expectations Assert-AreEqual $taskId2 $task2.Id @@ -80,12 +80,12 @@ function Test-GetTaskById param([string]$accountName, [string]$jobId, [string]$taskId) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $task = Get-AzureRMBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context + $task = Get-AzureBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context Assert-AreEqual $taskId $task.Id # Verify positional parameters also work - $task = Get-AzureRMBatchTask_ST $jobId $taskId -BatchContext $context + $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context Assert-AreEqual $taskId $task.Id } @@ -101,7 +101,7 @@ function Test-ListTasksByFilter $context = Get-AzureRMBatchAccountKeys -Name $accountName $filter = "startswith(id,'" + "$taskPrefix" + "')" - $tasks = Get-AzureRMBatchTask_ST -JobId $jobId -Filter $filter -BatchContext $context + $tasks = Get-AzureBatchTask_ST -JobId $jobId -Filter $filter -BatchContext $context Assert-AreEqual $matches $tasks.Length foreach($task in $tasks) @@ -110,8 +110,8 @@ function Test-ListTasksByFilter } # Verify parent object parameter set also works - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context - $tasks = Get-AzureRMBatchTask_ST -Job $job -Filter $filter -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -Job $job -Filter $filter -BatchContext $context Assert-AreEqual $matches $tasks.Length foreach($task in $tasks) @@ -129,13 +129,13 @@ function Test-ListTasksWithMaxCount param([string]$accountName, [string]$jobId, [string]$maxCount) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $tasks = Get-AzureRMBatchTask_ST -JobId $jobId -MaxCount $maxCount -BatchContext $context + $tasks = Get-AzureBatchTask_ST -JobId $jobId -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $tasks.Length # Verify parent object parameter set also works - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context - $tasks = Get-AzureRMBatchTask_ST -Job $job -MaxCount $maxCount -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -Job $job -MaxCount $maxCount -BatchContext $context Assert-AreEqual $maxCount $tasks.Length } @@ -149,13 +149,13 @@ function Test-ListAllTasks param([string]$accountName, [string] $jobId, [string]$count) $context = Get-AzureRMBatchAccountKeys -Name $accountName - $tasks = Get-AzureRMBatchTask_ST -JobId $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -JobId $jobId -BatchContext $context Assert-AreEqual $count $tasks.Length # Verify parent object parameter set also works - $job = Get-AzureRMBatchJob_ST $jobId -BatchContext $context - $tasks = Get-AzureRMBatchTask_ST -Job $job -BatchContext $context + $job = Get-AzureBatchJob_ST $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -Job $job -BatchContext $context Assert-AreEqual $count $tasks.Length } @@ -171,7 +171,7 @@ function Test-ListTaskPipeline $context = Get-AzureRMBatchAccountKeys -Name $accountName # Get Job into Get Task - $task = Get-AzureRMBatchJob_ST -Id $jobId -BatchContext $context | Get-AzureRMBatchTask_ST -BatchContext $context + $task = Get-AzureBatchJob_ST -Id $jobId -BatchContext $context | Get-AzureBatchTask_ST -BatchContext $context Assert-AreEqual $taskId $task.Id } @@ -186,20 +186,20 @@ function Test-DeleteTask $context = Get-AzureRMBatchAccountKeys -Name $accountName # Verify the task exists - $tasks = Get-AzureRMBatchTask_ST -JobId $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -JobId $jobId -BatchContext $context Assert-AreEqual 1 $tasks.Count if ($usePipeline -eq '1') { - Get-AzureRMBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context | Remove-AzureRMBatchTask_ST -Force -BatchContext $context + Get-AzureBatchTask_ST -JobId $jobId -Id $taskId -BatchContext $context | Remove-AzureBatchTask_ST -Force -BatchContext $context } else { - Remove-AzureRMBatchTask_ST -JobId $jobId -Id $taskId -Force -BatchContext $context + Remove-AzureBatchTask_ST -JobId $jobId -Id $taskId -Force -BatchContext $context } # Verify the task was deleted - $tasks = Get-AzureRMBatchTask_ST -JobId $jobId -BatchContext $context + $tasks = Get-AzureBatchTask_ST -JobId $jobId -BatchContext $context Assert-Null $tasks } @@ -213,11 +213,11 @@ function Test-TerminateTask $context = Get-AzureRMBatchAccountKeys -Name $accountName - Stop-AzureRMBatchTask_ST $jobId $taskId1 -BatchContext $context - Get-AzureRMBatchTask_ST $jobId $taskId2 -BatchContext $context | Stop-AzureRMBatchTask_ST -BatchContext $context + Stop-AzureBatchTask_ST $jobId $taskId1 -BatchContext $context + Get-AzureBatchTask_ST $jobId $taskId2 -BatchContext $context | Stop-AzureBatchTask_ST -BatchContext $context # Verify the tasks were terminated - foreach ($task in Get-AzureRMBatchTask_ST $jobId -BatchContext $context) + foreach ($task in Get-AzureBatchTask_ST $jobId -BatchContext $context) { Assert-AreEqual 'completed' $task.State.ToString().ToLower() } diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs index 7d0ac283e27a..c44be7f1441d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountCommand.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, "AzureRMBatchAccount"), OutputType(typeof(BatchAccountContext))] + [Cmdlet(VerbsCommon.Get, Constants.AzureRMBatchAccount), OutputType(typeof(BatchAccountContext))] public class GetBatchAccountCommand : BatchCmdletBase { [Alias("Name")] diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs index 7488ab50833d..4aebcda70028 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Get, "AzureRMBatchAccountKeys"), OutputType(typeof(BatchAccountContext))] + [Cmdlet(VerbsCommon.Get, Constants.AzureRMBatchAccountKeys), OutputType(typeof(BatchAccountContext))] public class GetBatchAccountKeysCommand : BatchCmdletBase { [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs index ad8eeb79af97..ecd36b03e35a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountCommand.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.New, "AzureRMBatchAccount"), OutputType(typeof(BatchAccountContext))] + [Cmdlet(VerbsCommon.New, Constants.AzureRMBatchAccount), OutputType(typeof(BatchAccountContext))] public class NewBatchAccountCommand : BatchCmdletBase { [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs index 3693d65d849a..14bb82c62ffe 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.New, "AzureRMBatchAccountKey"), OutputType(typeof(BatchAccountContext))] + [Cmdlet(VerbsCommon.New, Constants.AzureRMBatchAccountKey), OutputType(typeof(BatchAccountContext))] public class RegenBatchAccountKeyCommand : BatchCmdletBase { [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs index 91ad7bbd3e53..8c5862fcbd09 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Remove, "AzureRMBatchAccount")] + [Cmdlet(VerbsCommon.Remove, Constants.AzureRMBatchAccount)] public class RemoveBatchAccountCommand : BatchCmdletBase { private static string mamlCall = "RemoveAccount"; diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs index f0d0d6675741..fe5dc2aa071d 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Accounts/SetBatchAccountCommand.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Batch { - [Cmdlet(VerbsCommon.Set, "AzureRMBatchAccount"), OutputType(typeof(BatchAccountContext))] + [Cmdlet(VerbsCommon.Set, Constants.AzureRMBatchAccount), OutputType(typeof(BatchAccountContext))] public class SetBatchAccountCommand : BatchCmdletBase { [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml index a882157316f6..cd165684f282 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml @@ -11,7 +11,7 @@ Get - AzureBatchAccountKeys + AzureRMBatchAccountKeys @@ -152,7 +152,7 @@ Get - AzureBatchAccount + AzureRMBatchAccount @@ -344,7 +344,7 @@ cmdletexample2 westus CmdletExampleRG https: - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode Gets Batch compute nodes from a pool. @@ -356,11 +356,11 @@ cmdletexample2 westus CmdletExampleRG https: - The Get-AzureRMBatchComputeNode cmdlet gets Azure Batch compute nodes under a pool. Specify either the pool ID or pool object. Specify the Id parameter to get a single compute node. Specify the Filter parameter to get the compute nodes that match an OData filter. + The Get-AzureBatchComputeNode cmdlet gets Azure Batch compute nodes under a pool. Specify either the pool ID or pool object. Specify the Id parameter to get a single compute node. Specify the Filter parameter to get the compute nodes that match an OData filter. - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode Filter @@ -398,7 +398,7 @@ cmdletexample2 westus CmdletExampleRG https: - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode PoolId @@ -429,11 +429,11 @@ cmdletexample2 westus CmdletExampleRG https: - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode Pool - Specifies the pool, as a PSCloudPool object, that contains the compute nodes. To obtain a PSCloudPool object, use the Get-AzureRMBatchPool cmdlet. + Specifies the pool, as a PSCloudPool object, that contains the compute nodes. To obtain a PSCloudPool object, use the Get-AzureBatchPool cmdlet. PSCloudPool @@ -519,7 +519,7 @@ cmdletexample2 westus CmdletExampleRG https: Pool - Specifies the pool, as a PSCloudPool object, that contains the compute nodes. To obtain a PSCloudPool object, use the Get-AzureRMBatchPool cmdlet. + Specifies the pool, as a PSCloudPool object, that contains the compute nodes. To obtain a PSCloudPool object, use the Get-AzureBatchPool cmdlet. PSCloudPool @@ -595,7 +595,7 @@ cmdletexample2 westus CmdletExampleRG https: - PS C:\>Get-AzureRMBatchComputeNode -PoolId "Pool06" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context + PS C:\>Get-AzureBatchComputeNode -PoolId "Pool06" -Id "tvm-2316545714_1-20150725t213220z" -BatchContext $Context Id : tvm-2316545714_1-20150725t213220z Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z State : Idle @@ -629,7 +629,7 @@ Errors : - PS C:\>Get-AzureRMBatchComputeNode -PoolId "Pool06" -Filter "state eq 'idle'" -BatchContext $Context + PS C:\>Get-AzureBatchComputeNode -PoolId "Pool06" -Filter "state eq 'idle'" -BatchContext $Context Id : tvm-2316545714_1-20150725t213220z Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z State : Idle @@ -679,7 +679,7 @@ Errors : - PS C:\>Get-AzureRMBatchPool -Id "Pool07" -BatchContext $Context | Get-AzureRMBatchComputeNode -BatchContext $Context + PS C:\>Get-AzureBatchPool -Id "Pool07" -BatchContext $Context | Get-AzureBatchComputeNode -BatchContext $Context Id : tvm-2316545714_1-20150725t213220z Url : https://cmdletexample.westus.batch.azure.com/pools/MyPool/nodes/tvm-2316545714_1-20150725t213220z State : Idle @@ -713,7 +713,7 @@ CertificateReferences : Errors : - This command gets the pool that has the ID Pool07 by using the Get-AzureRMBatchPool cmdlet. The command passes that pool to the current cmdlet by using the pipeline operator. That cmdlet gets all compute nodes from that pool. + This command gets the pool that has the ID Pool07 by using the Get-AzureBatchPool cmdlet. The command passes that pool to the current cmdlet by using the pipeline operator. That cmdlet gets all compute nodes from that pool. @@ -726,15 +726,15 @@ Errors : - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent - Get-AzureRMBatchPool + Get-AzureBatchPool @@ -745,7 +745,7 @@ Errors : - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule Gets Batch job schedules. @@ -757,11 +757,11 @@ Errors : - The Get-AzureRMBatchJobSchedule cmdlet gets Azure Batch job schedules for the Batch account specified by the BatchContext parameter. Specify an ID to get a single job schedule. Specify the Filter parameter to get the job schedules that match an OData filter. + The Get-AzureBatchJobSchedule cmdlet gets Azure Batch job schedules for the Batch account specified by the BatchContext parameter. Specify an ID to get a single job schedule. Specify the Filter parameter to get the job schedules that match an OData filter. - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule Filter @@ -792,7 +792,7 @@ Errors : - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule Id @@ -920,7 +920,7 @@ Errors : - PS C:\>Get-AzureRMBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context + PS C:\>Get-AzureBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context CreationTime : 7/25/2015 9:15:43 PM DisplayName : ETag : 0x8D2953633427FCA @@ -954,7 +954,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - PS C:\>Get-AzureRMBatchJobSchedule -Filter "startswith(id,'Job')" -BatchContext $Context + PS C:\>Get-AzureBatchJobSchedule -Filter "startswith(id,'Job')" -BatchContext $Context CreationTime : 7/25/2015 9:15:43 PM DisplayName : ETag : 0x8D2953633427FCA @@ -1001,11 +1001,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - New-AzureRMBatchJobSchedule + New-AzureBatchJobSchedule - Remove-AzureRMBatchJobSchedule + Remove-AzureBatchJobSchedule @@ -1016,7 +1016,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - Get-AzureRMBatchJob + Get-AzureBatchJob Gets Batch jobs under the specified Batch account or job schedule. @@ -1028,11 +1028,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - The Get-AzureRMBatchJob cmdlet gets the Azure Batch jobs under the Batch account specified by the BatchAccountContext parameter. You can use the Id parameter to get a single job, or you can use the Filter parameter to get the jobs that match an OData filter. If you supply a job schedule ID or PSCloudJobSchedule instance, only the jobs under that job schedule will be returned. + The Get-AzureBatchJob cmdlet gets the Azure Batch jobs under the Batch account specified by the BatchAccountContext parameter. You can use the Id parameter to get a single job, or you can use the Filter parameter to get the jobs that match an OData filter. If you supply a job schedule ID or PSCloudJobSchedule instance, only the jobs under that job schedule will be returned. - Get-AzureRMBatchJob + Get-AzureBatchJob Filter @@ -1070,7 +1070,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - Get-AzureRMBatchJob + Get-AzureBatchJob Id @@ -1094,11 +1094,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - Get-AzureRMBatchJob + Get-AzureBatchJob JobSchedule - Specifies the PSCloudJobSchedule object representing the job schedule which contains the jobs. Use the Get-AzureRMBatchJobSchedule cmdlet to get a PSCloudJobSchedule object. + Specifies the PSCloudJobSchedule object representing the job schedule which contains the jobs. Use the Get-AzureBatchJobSchedule cmdlet to get a PSCloudJobSchedule object. PSCloudJobSchedule @@ -1172,7 +1172,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc JobSchedule - Specifies the PSCloudJobSchedule object representing the job schedule which contains the jobs. Use the Get-AzureRMBatchJobSchedule cmdlet to get a PSCloudJobSchedule object. + Specifies the PSCloudJobSchedule object representing the job schedule which contains the jobs. Use the Get-AzureBatchJobSchedule cmdlet to get a PSCloudJobSchedule object. PSCloudJobSchedule @@ -1260,7 +1260,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobsc - PS C:\>Get-AzureRMBatchJob -Id "Job01" -BatchContext $Context + PS C:\>Get-AzureBatchJob -Id "Job01" -BatchContext $Context CommonEnvironmentSettings : Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints CreationTime : 7/25/2015 9:12:07 PM @@ -1299,7 +1299,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - PS C:\>Get-AzureRMBatchJob -JobScheduleId "MyJobSchedule" -Filter "state eq 'active'" -BatchContext $Context + PS C:\>Get-AzureBatchJob -JobScheduleId "MyJobSchedule" -Filter "state eq 'active'" -BatchContext $Context CommonEnvironmentSettings : Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints CreationTime : 7/25/2015 9:15:44 PM @@ -1338,7 +1338,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - PS C:\>Get-AzureRMBatchJobSchedule -Id "MyJobSchedule" -BatchContext $Context | Get-AzureRMBatchJob -BatchContext $Context + PS C:\>Get-AzureBatchJobSchedule -Id "MyJobSchedule" -BatchContext $Context | Get-AzureBatchJob -BatchContext $Context CommonEnvironmentSettings : Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints CreationTime : 7/25/2015 9:15:44 PM @@ -1378,11 +1378,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule - Remove-AzureRMBatchJob + Remove-AzureBatchJob @@ -1393,7 +1393,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent Gets a Batch node file. @@ -1405,11 +1405,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - The Get-AzureRMBatchNodeFileContent cmdlet gets an Azure Batch node file and saves it as a file or to a stream. + The Get-AzureBatchNodeFileContent cmdlet gets an Azure Batch node file and saves it as a file or to a stream. - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent Name @@ -1454,7 +1454,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent Profile @@ -1499,7 +1499,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent PoolId @@ -1544,7 +1544,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent PoolId @@ -1589,11 +1589,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent InputObject - Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureRMBatchNodeFile cmdlet. + Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureBatchNodeFile cmdlet. PSNodeFile @@ -1620,11 +1620,11 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent InputObject - Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureRMBatchNodeFile cmdlet. + Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureBatchNodeFile cmdlet. PSNodeFile @@ -1703,7 +1703,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ InputObject - Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureRMBatchNodeFile cmdlet. + Specifies the file that this cmdlet gets, as a PSNodeFile object. To obtain a node file object, use the Get-AzureBatchNodeFile cmdlet. PSNodeFile @@ -1816,7 +1816,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - PS C:\>Get-AzureRMBatchNodeFileContent -JobId "Job01" -TaskId "Task01" -Name "StdOut.txt" -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFileContent -JobId "Job01" -TaskId "Task01" -Name "StdOut.txt" -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context This command gets the node file that is named StdOut.txt, and saves it to the E:\PowerShell\StdOut.txt file path on the local computer. The StdOut.txt node file is associated with task that has the ID Task01 for the job that has the ID Job01. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable. @@ -1835,10 +1835,10 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - PS C:\>Get-AzureRMBatchNodeFile -JobId "Job02" -TaskId "Task02" -Name "StdErr.txt" -BatchContext $Context | Get-AzureRMBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -JobId "Job02" -TaskId "Task02" -Name "StdErr.txt" -BatchContext $Context | Get-AzureBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context - This command gets the node file that is named StdErr.txt by using the Get-AzureRMBatchNodeFile cmdlet. The command passes that file to the current cmdlet by using the pipeline operator. The current cmdlet saves that file to the E:\PowerShell\StdOut.txt file path on the local computer. The StdOut.txt node file is associated with the task that has the ID Task02 for the job that has the ID Job02. + This command gets the node file that is named StdErr.txt by using the Get-AzureBatchNodeFile cmdlet. The command passes that file to the current cmdlet by using the pipeline operator. The current cmdlet saves that file to the E:\PowerShell\StdOut.txt file path on the local computer. The StdOut.txt node file is associated with the task that has the ID Task02 for the job that has the ID Job02. @@ -1855,7 +1855,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream" -PS C:\> Get-AzureRMBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Name "stdout.txt" -DestinationStream $Stream -BatchContext $Context +PS C:\> Get-AzureBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Name "stdout.txt" -DestinationStream $Stream -BatchContext $Context The first command creates a stream by using the New-Object cmdlet, and then stores it in the $Stream variable. @@ -1875,7 +1875,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Name - PS C:\>Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context This command gets the node file Startup\StdOut.txt from the compute node that has the ID ComputeNode01 in the pool that has the ID Pool01. The command saves the file to the E:\PowerShell\StdOut.txt file path on the local computer. @@ -1894,10 +1894,10 @@ PS C:\> Get-AzureRMBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Name - PS C:\>Get-AzureRMBatchNodeFile -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -BatchContext $Context | Get-AzureRMBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -BatchContext $Context | Get-AzureBatchNodeFileContent -DestinationPath "E:\PowerShell\StdOut.txt" -BatchContext $Context - This command gets the node file Startup\StdOut.txt by using Get-AzureRMBatchNodeFile from the compute node that has the ID ComputeNode01. The compute node is in the pool that has the ID Pool01. The command passes that node file to the current cmdlet. That cmdlet saves the file to the E:\PowerShell\StdOut.txt file path on the local computer. + This command gets the node file Startup\StdOut.txt by using Get-AzureBatchNodeFile from the compute node that has the ID ComputeNode01. The compute node is in the pool that has the ID Pool01. The command passes that node file to the current cmdlet. That cmdlet saves the file to the E:\PowerShell\StdOut.txt file path on the local computer. @@ -1914,7 +1914,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -JobId "Job03" -TaskId "Task11" -Name PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream" -PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "startup\stdout.txt" -DestinationStream $Stream -BatchContext $Context +PS C:\> Get-AzureBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "startup\stdout.txt" -DestinationStream $Stream -BatchContext $Context The first command creates a stream by using the New-Object cmdlet, and then stores it in the $Stream variable. @@ -1935,7 +1935,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile @@ -1946,7 +1946,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile Gets the properties of Batch node files. @@ -1958,11 +1958,11 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - The Get-AzureRMBatchNodeFile cmdlet gets the properties of the Azure Batch node files of a task or compute node. To narrow your results, you can specify a filter. If you specify a task, but not a filter, this cmdlet returns properties for all node files for that task. If you specify a compute node, but not a filter, this cmdlet returns properties for all node files for that compute node. + The Get-AzureBatchNodeFile cmdlet gets the properties of the Azure Batch node files of a task or compute node. To narrow your results, you can specify a filter. If you specify a task, but not a filter, this cmdlet returns properties for all node files for that task. If you specify a compute node, but not a filter, this cmdlet returns properties for all node files for that compute node. - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile PoolId @@ -2000,7 +2000,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile Filter @@ -2051,7 +2051,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile Name @@ -2089,11 +2089,11 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile Task - Specifies the task, as a PSCloudTask object, with which the node files are associated. To obtain a task object, use the Get-AzureRMBatchTask cmdlet. + Specifies the task, as a PSCloudTask object, with which the node files are associated. To obtain a task object, use the Get-AzureBatchTask cmdlet. PSCloudTask @@ -2133,7 +2133,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile PoolId @@ -2184,11 +2184,11 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile ComputeNode - Specifies the compute node, as a PSComputeNode object, that contains the Batch node files. To obtain a compute node object, use the Get-AzureRMBatchComputeNode cmdlet. + Specifies the compute node, as a PSComputeNode object, that contains the Batch node files. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet. PSComputeNode @@ -2244,7 +2244,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp ComputeNode - Specifies the compute node, as a PSComputeNode object, that contains the Batch node files. To obtain a compute node object, use the Get-AzureRMBatchComputeNode cmdlet. + Specifies the compute node, as a PSComputeNode object, that contains the Batch node files. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet. PSComputeNode @@ -2352,7 +2352,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp Task - Specifies the task, as a PSCloudTask object, with which the node files are associated. To obtain a task object, use the Get-AzureRMBatchTask cmdlet. + Specifies the task, as a PSCloudTask object, with which the node files are associated. To obtain a task object, use the Get-AzureBatchTask cmdlet. PSCloudTask @@ -2416,7 +2416,7 @@ PS C:\> Get-AzureRMBatchNodeFileContent -PoolId "Pool01" -ComputeNodeId "Comp - PS C:\>Get-AzureRMBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Name "Stdout.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -JobId "Job-000001" -TaskId "Task26" -Name "Stdout.txt" -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- @@ -2440,7 +2440,7 @@ False StdOut.txt Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdl - PS C:\>Get-AzureRMBatchNodeFile -JobId "Job-00002" -TaskId "Task26" -Filter "startswith(name,'St')" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -JobId "Job-00002" -TaskId "Task26" -Filter "startswith(name,'St')" -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- @@ -2465,7 +2465,7 @@ False StdOut.txt Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdlet - PS C:\>Get-AzureRMBatchTask "Job-00003" "Task31" -BatchContext $Context | Get-AzureRMBatchNodeFile -Recursive -BatchContext $Context + PS C:\>Get-AzureBatchTask "Job-00003" "Task31" -BatchContext $Context | Get-AzureBatchNodeFile -Recursive -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- @@ -2494,7 +2494,7 @@ False wd\newFile.txt Microsoft.Azure.Commands.Batch.Models.PSFile... https://c - PS C:\>Get-AzureRMBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Name "Startup\StdOut.txt" -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- False startup\stdout.txt Microsoft.Azure.Commands.Batch.Models.PSFile... https://cmdletexample.westus.Batch.contoso... @@ -2516,7 +2516,7 @@ False startup\stdout.txt Microsoft.Azure.Commands.Batch.Models.PSFile - PS C:\>Get-AzureRMBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Filter "startswith(name,'startup')" -Recursive -BatchContext $Context + PS C:\>Get-AzureBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Filter "startswith(name,'startup')" -Recursive -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- True startup https://cmdletexample.westus.Batch.contoso... @@ -2542,7 +2542,7 @@ True startup\wd - PS C:\>Get-AzureRMBatchComputeNode "Pool22" -Id "ComputeNode01" -BatchContext $Context | Get-AzureRMBatchNodeFile -BatchContext $Context + PS C:\>Get-AzureBatchComputeNode "Pool22" -Id "ComputeNode01" -BatchContext $Context | Get-AzureBatchNodeFile -BatchContext $Context IsDirectory Name Properties Url ----------- ---- ---------- --- True shared https://cmdletexample.westus.Batch.contoso... @@ -2567,11 +2567,11 @@ True workitems https://cmdletexample.westus.Batch.c - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode - Get-AzureRMBatchTask + Get-AzureBatchTask @@ -2582,7 +2582,7 @@ True workitems https://cmdletexample.westus.Batch.c - Get-AzureRMBatchPool + Get-AzureBatchPool Gets Batch pools under the specified Batch account. @@ -2594,11 +2594,11 @@ True workitems https://cmdletexample.westus.Batch.c - The Get-AzureRMBatchPool cmdlet gets the Azure Batch pools under the Batch account specified with the BatchContext parameter. You can use the Id parameter to get a single pool, or you can use the Filter parameter to get the pools that match an OData filter. + The Get-AzureBatchPool cmdlet gets the Azure Batch pools under the Batch account specified with the BatchContext parameter. You can use the Id parameter to get a single pool, or you can use the Filter parameter to get the pools that match an OData filter. - Get-AzureRMBatchPool + Get-AzureBatchPool Filter @@ -2629,7 +2629,7 @@ True workitems https://cmdletexample.westus.Batch.c - Get-AzureRMBatchPool + Get-AzureBatchPool Id @@ -2757,7 +2757,7 @@ True workitems https://cmdletexample.westus.Batch.c - PS C:\>Get-AzureRMBatchPool -Id "MyPool" -BatchContext $Context + PS C:\>Get-AzureBatchPool -Id "MyPool" -BatchContext $Context AllocationState : Resizing AllocationStateTransitionTime : 7/25/2015 9:30:28 PM AutoScaleEnabled : False @@ -2805,7 +2805,7 @@ VirtualMachineSize : small - PS C:\>Get-AzureRMBatchPool -Filter "startswith(id,'My')" -BatchContext $Context + PS C:\>Get-AzureBatchPool -Filter "startswith(id,'My')" -BatchContext $Context AllocationState : Resizing AllocationStateTransitionTime : 7/25/2015 9:30:28 PM AutoScaleEnabled : False @@ -2853,11 +2853,11 @@ VirtualMachineSize : small - New-AzureRMBatchPool + New-AzureBatchPool - Remove-AzureRMBatchPool + Remove-AzureBatchPool @@ -2868,7 +2868,7 @@ VirtualMachineSize : small - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile Gets an RDP file from a compute node. @@ -2880,11 +2880,11 @@ VirtualMachineSize : small - The Get-AzureRMBatchRemoteDesktopProtocolFile cmdlet gets a Remote Desktop Protocol (RDP) file from a compute node and saves it as a file or to a user supplied stream. + The Get-AzureBatchRemoteDesktopProtocolFile cmdlet gets a Remote Desktop Protocol (RDP) file from a compute node and saves it as a file or to a user supplied stream. - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile PoolId @@ -2922,7 +2922,7 @@ VirtualMachineSize : small - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile PoolId @@ -2960,11 +2960,11 @@ VirtualMachineSize : small - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile ComputeNode - Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureRMBatchComputeNode cmdlet. + Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet. PSComputeNode @@ -2991,11 +2991,11 @@ VirtualMachineSize : small - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile ComputeNode - Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureRMBatchComputeNode cmdlet. + Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet. PSComputeNode @@ -3038,7 +3038,7 @@ VirtualMachineSize : small ComputeNode - Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureRMBatchComputeNode cmdlet. + Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet. PSComputeNode @@ -3151,7 +3151,7 @@ VirtualMachineSize : small - PS C:\>Get-AzureRMBatchRemoteDesktopProtocolFile -PoolId "Pool06" -ComputeNodeId "ComputeNode01" -DestinationPath "C:\PowerShell\ComputeNode01.rdp" -BatchContext $Context + PS C:\>Get-AzureBatchRemoteDesktopProtocolFile -PoolId "Pool06" -ComputeNodeId "ComputeNode01" -DestinationPath "C:\PowerShell\ComputeNode01.rdp" -BatchContext $Context This command gets an RDP file from the compute node that has the ID ComputeNode01 in the pool that has the ID Pool06. The command saves the .rdp file as C:\PowerShell\MyComputeNode.rdp. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable. @@ -3170,7 +3170,7 @@ VirtualMachineSize : small - PS C:\>Get-AzureRMBatchComputeNode -PoolId "Pool06" -Id "ComputeNode02" -BatchContext $Context | Get-AzureRMBatchRemoteDesktopProtocolFile -DestinationPath "C:\PowerShell\MyComputeNode02.rdp" -BatchContext $Context + PS C:\>Get-AzureBatchComputeNode -PoolId "Pool06" -Id "ComputeNode02" -BatchContext $Context | Get-AzureBatchRemoteDesktopProtocolFile -DestinationPath "C:\PowerShell\MyComputeNode02.rdp" -BatchContext $Context This command gets the compute node that has the ID ComputeNode02 in the pool that has the ID Pool06. The command passes that compute node to the current cmdlet by using the pipeline operator. The current cmdlet gets an .rpd file from the compute node, and then saves the contents as a file that is named C:\PowerShell\MyComputeNode02.rdp. @@ -3190,7 +3190,7 @@ VirtualMachineSize : small PS C:\>$Stream = New-Object -TypeName "System.IO.MemoryStream" - PS C:\> Get-AzureRMBatchRemoteDesktopProtocolFile "Pool06" -ComputeNodeId "ComputeNode03" -DestinationStream $Stream -BatchContext $Context + PS C:\> Get-AzureBatchRemoteDesktopProtocolFile "Pool06" -ComputeNodeId "ComputeNode03" -DestinationStream $Stream -BatchContext $Context The first command creates a stream by using the New-Object cmdlet, and then stores it in the $Stream variable. @@ -3211,7 +3211,7 @@ VirtualMachineSize : small - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode @@ -3222,7 +3222,7 @@ VirtualMachineSize : small - Get-AzureRMBatchTask + Get-AzureBatchTask Gets the Batch tasks for the specified job. @@ -3234,11 +3234,11 @@ VirtualMachineSize : small - The Get-AzureRMBatchTask cmdlet gets the Azure Batch tasks for the job specified by either the JobId parameter or the Job parameter. You can use the Id parameter to get a single task, or you can use the Filter parameter to get the tasks that match an OData filter. + The Get-AzureBatchTask cmdlet gets the Azure Batch tasks for the job specified by either the JobId parameter or the Job parameter. You can use the Id parameter to get a single task, or you can use the Filter parameter to get the tasks that match an OData filter. - Get-AzureRMBatchTask + Get-AzureBatchTask JobId @@ -3276,7 +3276,7 @@ VirtualMachineSize : small - Get-AzureRMBatchTask + Get-AzureBatchTask JobId @@ -3307,11 +3307,11 @@ VirtualMachineSize : small - Get-AzureRMBatchTask + Get-AzureBatchTask Job - Specifies the PSCloudJob object representing the job which contains the tasks. Use the Get-AzureRMBatchJob cmdlet to get a PSCloudJob object. + Specifies the PSCloudJob object representing the job which contains the tasks. Use the Get-AzureBatchJob cmdlet to get a PSCloudJob object. PSCloudJob @@ -3385,7 +3385,7 @@ VirtualMachineSize : small Job - Specifies the PSCloudJob object representing the job which contains the tasks. Use the Get-AzureRMBatchJob cmdlet to get a PSCloudJob object. + Specifies the PSCloudJob object representing the job which contains the tasks. Use the Get-AzureBatchJob cmdlet to get a PSCloudJob object. PSCloudJob @@ -3473,7 +3473,7 @@ VirtualMachineSize : small - PS C:\>Get-AzureRMBatchTask -JobId "Job01" -Id "MyTask" -BatchContext $Context + PS C:\>Get-AzureBatchTask -JobId "Job01" -Id "MyTask" -BatchContext $Context AffinityInformation : CommandLine : cmd /c dir /s ComputeNodeInformation : Microsoft.Azure.Commands.Batch.Models.PSComputeNodeInformation @@ -3511,7 +3511,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - PS C:\>Get-AzureRMBatchTask -JobId "Job02" -Filter "state eq 'completed'" -BatchContext $Context + PS C:\>Get-AzureBatchTask -JobId "Job02" -Filter "state eq 'completed'" -BatchContext $Context AffinityInformation : CommandLine : cmd /c dir /s ComputeNodeInformation : Microsoft.Azure.Commands.Batch.Models.PSComputeNodeInformation @@ -3568,15 +3568,15 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ - Get-AzureRMBatchJob + Get-AzureBatchJob - New-AzureRMBatchTask + New-AzureBatchTask - Remove-AzureRMBatchTask + Remove-AzureBatchTask @@ -3595,7 +3595,7 @@ Url : https://cmdletexample.westus.batch.azure.com/jobs/ New - AzureBatchAccountKey + AzureRMBatchAccountKey @@ -3767,7 +3767,7 @@ cmdletexample westus CmdletExample https: New - AzureBatchAccount + AzureRMBatchAccount @@ -3955,7 +3955,7 @@ cmdletexample WestUS CmdletExampleRG https: - New-AzureRMBatchComputeNodeUser + New-AzureBatchComputeNodeUser Creates a user account on a Batch compute node. @@ -3967,11 +3967,11 @@ cmdletexample WestUS CmdletExampleRG https: - The New-AzureRMBatchComputeNodeUser cmdlet creates a user account on an Azure Batch compute node. + The New-AzureBatchComputeNodeUser cmdlet creates a user account on an Azure Batch compute node. - New-AzureRMBatchComputeNodeUser + New-AzureBatchComputeNodeUser PoolId @@ -4029,7 +4029,7 @@ cmdletexample WestUS CmdletExampleRG https: - New-AzureRMBatchComputeNodeUser + New-AzureBatchComputeNodeUser ComputeNode @@ -4233,7 +4233,7 @@ cmdletexample WestUS CmdletExampleRG https: - PS C:\>New-AzureRMBatchComputeNodeUser -PoolId "MyPool01" -ComputeNodeId "ComputeNode01" -Name "TestUser" -Password "Password" -ExpiryTime ([DateTime]::Now.AddDays(7)) -IsAdmin -BatchContext $Context + PS C:\>New-AzureBatchComputeNodeUser -PoolId "MyPool01" -ComputeNodeId "ComputeNode01" -Name "TestUser" -Password "Password" -ExpiryTime ([DateTime]::Now.AddDays(7)) -IsAdmin -BatchContext $Context This command creates a user account on the compute node that has the ID ComputeNode01. The node is in the pool that has the ID MyPool01. The user name is TestUser, the password is Password, the account expires in seven days, and the account is has administrative credentials. @@ -4252,10 +4252,10 @@ cmdletexample WestUS CmdletExampleRG https: - PS C:\>Get-AzureRMBatchComputeNode "MyPool01" -ComputeNodeId "ComputeNode01" -BatchContext $Context | New-AzureRMBatchComputeNodeUser -Name "TestUser" -Password "Password" -BatchContext $Context + PS C:\>Get-AzureBatchComputeNode "MyPool01" -ComputeNodeId "ComputeNode01" -BatchContext $Context | New-AzureBatchComputeNodeUser -Name "TestUser" -Password "Password" -BatchContext $Context - This command gets the compute node named ComputeNode01 by using the Get-AzureRMBatchComputeNode cmdlet. That node is in the pool that has the ID MyPool01. The command passes that compute node to the current cmdlet by using the pipeline operator. The command creates a user account that has the user name TestUserand the password Password. + This command gets the compute node named ComputeNode01 by using the Get-AzureBatchComputeNode cmdlet. That node is in the pool that has the ID MyPool01. The command passes that compute node to the current cmdlet by using the pipeline operator. The command creates a user account that has the user name TestUserand the password Password. @@ -4272,11 +4272,11 @@ cmdletexample WestUS CmdletExampleRG https: - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode - Remove-AzureRMBatchComputeNodeUser + Remove-AzureBatchComputeNodeUser @@ -4287,7 +4287,7 @@ cmdletexample WestUS CmdletExampleRG https: - New-AzureRMBatchJobSchedule + New-AzureBatchJobSchedule Creates a job schedule in the Batch service. @@ -4299,11 +4299,11 @@ cmdletexample WestUS CmdletExampleRG https: - The New-AzureRMBatchJobSchedule cmdlet creates a job schedule in the Azure Batch service. The BatchAccountContext parameter specifies the account in which this cmdlet creates the schedule. + The New-AzureBatchJobSchedule cmdlet creates a job schedule in the Azure Batch service. The BatchAccountContext parameter specifies the account in which this cmdlet creates the schedule. - New-AzureRMBatchJobSchedule + New-AzureBatchJobSchedule Id @@ -4489,7 +4489,7 @@ PS C:\> $Schedule.RecurrenceInterval = [TimeSpan]::FromDays(1) PS C:\> $JobSpecification = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSJobSpecification" PS C:\> $JobSpecification.PoolInformation = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSPoolInformation" PS C:\> $JobSpecification.PoolInformation.PoolId = "ContosoPool06" -PS C:\> New-AzureRMBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule -JobSpecification $JobSpecification -BatchContext $Context +PS C:\> New-AzureBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule -JobSpecification $JobSpecification -BatchContext $Context This example creates a job schedule. The first five commands create and modify PSSchedule, PSJobSpecification, and PSPoolInformation objects. The commands use the New-Object cmdlet and standard Azure PowerShell syntax. The commands store these objects in the $Schedule and $JobSpecification variables. @@ -4510,11 +4510,11 @@ PS C:\> New-AzureRMBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule - - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule - Remove-AzureRMBatchJobSchedule + Remove-AzureBatchJobSchedule @@ -4525,7 +4525,7 @@ PS C:\> New-AzureRMBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule - - New-AzureRMBatchJob + New-AzureBatchJob Creates a job in the Batch service. @@ -4537,11 +4537,11 @@ PS C:\> New-AzureRMBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule - - The New-AzureRMBatchJob cmdlet creates a job in the Azure Batch service in the account specified by the BatchAccountContext parameter. + The New-AzureBatchJob cmdlet creates a job in the Azure Batch service in the account specified by the BatchAccountContext parameter. - New-AzureRMBatchJob + New-AzureBatchJob Id @@ -4819,7 +4819,7 @@ PS C:\> New-AzureRMBatchJobSchedule -Id "JobSchedule17" -Schedule $Schedule - PS C:\>$PoolInformation = New-Object -TypeName "Microsoft.Azure.Commands.Batch.Models.PSPoolInformation" PS C:\> $PoolInformation.PoolId = "Pool22" -PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformation -BatchContext $Context +PS C:\> New-AzureBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformation -BatchContext $Context The first command creates a PSPoolInformation object by using the New-Object cmdlet. The command stores that object in the $PoolInformation variable. @@ -4841,11 +4841,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule - Remove-AzureRMBatchJob + Remove-AzureBatchJob @@ -4856,7 +4856,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - New-AzureRMBatchPool + New-AzureBatchPool Creates a new pool in the Batch service under the specified account. @@ -4868,11 +4868,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The New-AzureRMBatchPool cmdlet creates a new pool in the Azure Batch service under the account specified by the BatchContext parameter. + The New-AzureBatchPool cmdlet creates a new pool in the Azure Batch service under the account specified by the BatchContext parameter. - New-AzureRMBatchPool + New-AzureBatchPool Id @@ -4972,7 +4972,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - New-AzureRMBatchPool + New-AzureBatchPool Id @@ -5316,7 +5316,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>New-AzureRMBatchPool -Id "MyPool" -VirtualMachineSize "small" -OSFamily "4" -TargetOSVersion "*" -TargetDedicated 3 -BatchContext $Context + PS C:\>New-AzureBatchPool -Id "MyPool" -VirtualMachineSize "small" -OSFamily "4" -TargetOSVersion "*" -TargetDedicated 3 -BatchContext $Context This command creates a new pool with id MyPool using the TargetDedicated parameter set. The target allocation is three compute nodes. The pool will use small virtual machines imaged with the latest operating system version of family four. @@ -5335,7 +5335,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>New-AzureRMBatchPool -Id "AutoScalePool" -VirtualMachineSize "small" -OSFamily "4" -TargetOSVersion "*" -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context + PS C:\>New-AzureBatchPool -Id "AutoScalePool" -VirtualMachineSize "small" -OSFamily "4" -TargetOSVersion "*" -AutoScaleFormula '$TargetDedicated=2;' -BatchContext $Context This command creates a new pool with ID AutoScalePool using the AutoScale parameter set. The pool will use small virtual machines imaged with the latest operating system version of family four, and the target number of compute nodes will be determined by the Autoscale formula. @@ -5355,11 +5355,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchPool + Get-AzureBatchPool - Remove-AzureRMBatchPool + Remove-AzureBatchPool @@ -5370,7 +5370,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - New-AzureRMBatchTask + New-AzureBatchTask Creates a new Batch task under the specified job. @@ -5382,11 +5382,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The New-AzureRMBatchTask cmdlet creates a new Azure Batch task under the job specified by the JobId parameter or the Job parameter. + The New-AzureBatchTask cmdlet creates a new Azure Batch task under the job specified by the JobId parameter or the Job parameter. - New-AzureRMBatchTask + New-AzureBatchTask AffinityInformation @@ -5465,7 +5465,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - New-AzureRMBatchTask + New-AzureBatchTask AffinityInformation @@ -5497,7 +5497,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat Job - Specifies the PSCloudJob object representing the job to create the task under. Use the Get-AzureRMBatchJob cmdlet to get a PSCloudJob object. + Specifies the PSCloudJob object representing the job to create the task under. Use the Get-AzureBatchJob cmdlet to get a PSCloudJob object. PSCloudJob @@ -5632,7 +5632,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat Job - Specifies the PSCloudJob object representing the job to create the task under. Use the Get-AzureRMBatchJob cmdlet to get a PSCloudJob object. + Specifies the PSCloudJob object representing the job to create the task under. Use the Get-AzureBatchJob cmdlet to get a PSCloudJob object. PSCloudJob @@ -5733,7 +5733,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>New-AzureRMBatchTask -JobId "Job-000001" -Id "MyTask" -CommandLine "cmd /c dir /s" -BatchContext $Context + PS C:\>New-AzureBatchTask -JobId "Job-000001" -Id "MyTask" -CommandLine "cmd /c dir /s" -BatchContext $Context This command creates a new task with ID MyTask under job Job-000001. The task will run the command-line "cmd /c dir /s". @@ -5752,7 +5752,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Get-AzureRMBatchJob -Id "Job-000001" -BatchContext $Context | New-AzureRMBatchTask -Id "MyTask2" -CommandLine "cmd /c echo hello > newFile.txt" -RunElevated -BatchContext $Context + PS C:\>Get-AzureBatchJob -Id "Job-000001" -BatchContext $Context | New-AzureBatchTask -Id "MyTask2" -CommandLine "cmd /c echo hello > newFile.txt" -RunElevated -BatchContext $Context This command creates a new task with ID MyTask2 under job Job-000001. The task will run the command-line "cmd /c echo hello > newFile.txt" with elevated permissions. @@ -5772,15 +5772,15 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchJob + Get-AzureBatchJob - Get-AzureRMBatchTask + Get-AzureBatchTask - Remove-AzureRMBatchTask + Remove-AzureBatchTask @@ -5799,7 +5799,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat Remove - AzureBatchAccount + AzureRMBatchAccount @@ -5965,7 +5965,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchComputeNodeUser + Remove-AzureBatchComputeNodeUser Deletes a user account from a Batch compute node. @@ -5977,11 +5977,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The Remove-AzureRMBatchComputeNodeUser cmdlet deletes a user account from an Azure Batch compute node. + The Remove-AzureBatchComputeNodeUser cmdlet deletes a user account from an Azure Batch compute node. - Remove-AzureRMBatchComputeNodeUser + Remove-AzureBatchComputeNodeUser PoolId @@ -6142,7 +6142,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Remove-AzureRMBatchComputeNodeUser -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "User14" -Force -BatchContext $Context + PS C:\>Remove-AzureBatchComputeNodeUser -PoolId "Pool01" -ComputeNodeId "ComputeNode01" -Name "User14" -Force -BatchContext $Context This command deletes the user named User14 from compute node named ComputeNode01. The compute node is in the pool named Pool01. This command specifies the Force parameter. Therefore, the command does not prompt you for confirmation. @@ -6162,7 +6162,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - New-AzureRMBatchComputeNodeUser + New-AzureBatchComputeNodeUser @@ -6173,7 +6173,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchJobSchedule + Remove-AzureBatchJobSchedule Removes a Batch job schedule. @@ -6185,11 +6185,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The Remove-AzureRMBatchJobSchedule cmdlet removes an Azure Batch job schedule. This cmdlet prompts you for confirmation before it removes a schedule. + The Remove-AzureBatchJobSchedule cmdlet removes an Azure Batch job schedule. This cmdlet prompts you for confirmation before it removes a schedule. - Remove-AzureRMBatchJobSchedule + Remove-AzureBatchJobSchedule Id @@ -6312,7 +6312,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Remove-AzureRMBatchJobSchedule "JobSchedule17" -BatchContext $Context + PS C:\>Remove-AzureBatchJobSchedule "JobSchedule17" -BatchContext $Context This command deletes the job schedule that has the ID JobSchedule17. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable. This command prompts you before it removes the schedule. @@ -6331,10 +6331,10 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Get-AzureRMBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context | Remove-AzureRMBatchJobSchedule -Force -BatchContext $Context + PS C:\>Get-AzureBatchJobSchedule -Id "JobSchedule23" -BatchContext $Context | Remove-AzureBatchJobSchedule -Force -BatchContext $Context - This command gets the job schedule that has the ID JobSchedule23 by using the Get-AzureRMBatchJobSchedule cmdlet. The command passes that schedule to the current cmdlet by using the pipeline operator. The command removes that schedule. The command specifies the Force parameter. Therefore, it does not prompt you for confirmation. + This command gets the job schedule that has the ID JobSchedule23 by using the Get-AzureBatchJobSchedule cmdlet. The command passes that schedule to the current cmdlet by using the pipeline operator. The command removes that schedule. The command specifies the Force parameter. Therefore, it does not prompt you for confirmation. @@ -6347,11 +6347,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule - New-AzureRMBatchJobSchedule + New-AzureBatchJobSchedule @@ -6362,7 +6362,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchJob + Remove-AzureBatchJob Deletes the specified Batch job. @@ -6374,11 +6374,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The Remove-AzureRMBatchJob cmdlet deletes the specified Azure Batch job. You will be prompted for confirmation unless you use the Force parameter. + The Remove-AzureBatchJob cmdlet deletes the specified Azure Batch job. You will be prompted for confirmation unless you use the Force parameter. - Remove-AzureRMBatchJob + Remove-AzureBatchJob Id @@ -6501,7 +6501,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Remove-AzureRMBatchJob -Id "Job-000001" -BatchContext $Context + PS C:\>Remove-AzureBatchJob -Id "Job-000001" -BatchContext $Context This command deletes the job with ID Job-000001. The user is prompted for confirmation before the delete operation takes place. @@ -6520,7 +6520,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Get-AzureRMBatchJob -Id "Job-000002" -BatchContext $Context | Remove-AzureRMBatchJob -Force -BatchContext $Context + PS C:\>Get-AzureBatchJob -Id "Job-000002" -BatchContext $Context | Remove-AzureBatchJob -Force -BatchContext $Context This command deletes the job with ID Job-000002. Since the Force parameter is present, the confirmation prompt is suppressed. @@ -6540,7 +6540,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchJob + Get-AzureBatchJob @@ -6551,7 +6551,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchPool + Remove-AzureBatchPool Deletes the specified Batch pool. @@ -6563,11 +6563,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The Remove-AzureRMBatchPool cmdlet deletes the specified Azure Batch pool. You will be prompted for confirmation unless you use the Force parameter. + The Remove-AzureBatchPool cmdlet deletes the specified Azure Batch pool. You will be prompted for confirmation unless you use the Force parameter. - Remove-AzureRMBatchPool + Remove-AzureBatchPool Id @@ -6690,7 +6690,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Remove-AzureRMBatchPool -Id "MyPool" -BatchContext $Context + PS C:\>Remove-AzureBatchPool -Id "MyPool" -BatchContext $Context This command deletes the pool with ID MyPool. The user is prompted for confirmation before the delete operation takes place. @@ -6709,7 +6709,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Get-AzureRMBatchPool -BatchContext $Context | Remove-AzureRMBatchPool -Force -BatchContext $Context + PS C:\>Get-AzureBatchPool -BatchContext $Context | Remove-AzureBatchPool -Force -BatchContext $Context This command deletes all Batch pools. Since the Force parameter is present, the confirmation prompt is suppressed. @@ -6725,11 +6725,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchPool + Get-AzureBatchPool - New-AzureRMBatchPool + New-AzureBatchPool @@ -6744,7 +6744,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchTask + Remove-AzureBatchTask Deletes the specified Batch task. @@ -6756,11 +6756,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - The Remove-AzureRMBatchTask cmdlet deletes the specified Azure Batch task. You will be prompted for confirmation unless you use the Force parameter. + The Remove-AzureBatchTask cmdlet deletes the specified Azure Batch task. You will be prompted for confirmation unless you use the Force parameter. - Remove-AzureRMBatchTask + Remove-AzureBatchTask JobId @@ -6797,11 +6797,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Remove-AzureRMBatchTask + Remove-AzureBatchTask InputObject - Specifies the PSCloudTask object representing the task to delete. Use the Get-AzureRMBatchTask cmdlet to get a PSCloudTask object. + Specifies the PSCloudTask object representing the task to delete. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object. PSCloudTask @@ -6867,7 +6867,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat InputObject - Specifies the PSCloudTask object representing the task to delete. Use the Get-AzureRMBatchTask cmdlet to get a PSCloudTask object. + Specifies the PSCloudTask object representing the task to delete. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object. PSCloudTask @@ -6944,7 +6944,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Remove-AzureRMBatchTask -JobId "Job-000001" -Id "MyTask" -BatchContext $Context + PS C:\>Remove-AzureBatchTask -JobId "Job-000001" -Id "MyTask" -BatchContext $Context This command deletes the task with ID MyTask in job Job-000001. The user is prompted for confirmation before the delete operation takes place. @@ -6963,7 +6963,7 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - PS C:\>Get-AzureRMBatchTask "Job-000001" "MyTask2" -BatchContext $Context | Remove-AzureRMBatchTask -Force -BatchContext $Context + PS C:\>Get-AzureBatchTask "Job-000001" "MyTask2" -BatchContext $Context | Remove-AzureBatchTask -Force -BatchContext $Context This command deletes the task with id MyTask2 in job Job-000001. Since the Force parameter is present, the confirmation prompt is suppressed. @@ -6983,11 +6983,11 @@ PS C:\> New-AzureRMBatchJob -Id "ContosoJob35" -PoolInformation $PoolInformat - Get-AzureRMBatchTask + Get-AzureBatchTask - New-AzureRMBatchTask + New-AzureBatchTask @@ -7012,76 +7012,76 @@ Switch-AzureMode AzureResourceManager Gets a Batch account under the current subscription. Get-AzureRMBatchAccountKeys Gets the specified key of the specified Batch accounts under the current subscription. - Get-AzureRMBatchComputeNode + Get-AzureBatchComputeNode Gets Batch compute nodes from a pool. - Get-AzureRMBatchJob + Get-AzureBatchJob Gets Batch jobs under the specified Batch account or job schedule. - Get-AzureRMBatchJobSchedule + Get-AzureBatchJobSchedule Gets Batch job schedules. - Get-AzureRMBatchNodeFile + Get-AzureBatchNodeFile Gets the properties of Batch node files. - Get-AzureRMBatchNodeFileContent + Get-AzureBatchNodeFileContent Gets a Batch node file. - Get-AzureRMBatchPool + Get-AzureBatchPool Gets Batch pools under the specified Batch account. - Get-AzureRMBatchRemoteDesktopProtocolFile + Get-AzureBatchRemoteDesktopProtocolFile Gets an RDP file from a compute node. - Get-AzureRMBatchTask + Get-AzureBatchTask Gets the Batch tasks for the specified job. New-AzureRMBatchAccount Creates a new Batch account. New-AzureRMBatchAccountKey Regenerates the specified key of the specified Batch account. - New-AzureRMBatchComputeNodeUser + New-AzureBatchComputeNodeUser Creates a user account on a Batch compute node. - New-AzureRMBatchJob + New-AzureBatchJob Creates a job in the Batch service. - New-AzureRMBatchJobSchedule + New-AzureBatchJobSchedule Creates a job schedule in the Batch service. - New-AzureRMBatchPool + New-AzureBatchPool Creates a new pool in the Batch service under the specified account. - New-AzureRMBatchTask + New-AzureBatchTask Creates a new Batch task under the specified job. Remove-AzureRMBatchAccount Removes the specified Batch account. - Remove-AzureRMBatchComputeNodeUser + Remove-AzureBatchComputeNodeUser Deletes a user account from a Batch compute node. - Remove-AzureRMBatchJob + Remove-AzureBatchJob Deletes the specified Batch job. - Remove-AzureRMBatchJobSchedule + Remove-AzureBatchJobSchedule Removes a Batch job schedule. - Remove-AzureRMBatchPool + Remove-AzureBatchPool Deletes the specified Batch pool. - Remove-AzureRMBatchTask + Remove-AzureBatchTask Deletes the specified Batch task. Set-AzureRMBatchAccount Updates the specified Batch account. - Start-AzureRMBatchPoolResize + Start-AzureBatchPoolResize Starts to resize a pool. - Stop-AzureRMBatchPoolResize + Stop-AzureBatchPoolResize Stops a pool resize operation. For more information about, or for the syntax of, any of the cmdlets, use the Get-Help <cmdlet name> cmdlet, where <cmdlet name> is the name of the cmdlet that you want to research. For more detailed information, you can run any of the following cmdlets: ● Get-Help <cmdlet name> -Detailed ● Get-Help <cmdlet name> -Examples ● Get-Help <cmdlet name> -Full Azure Cmdlet Reference - Azure Resource Manager CmdletsUsing Windows Powershell with Resource ManagerSet-AzureRMBatchAccountUpdates the specified Batch account.SetAzureBatchAccountThe Set-AzureRMBatchAccount cmdlet updates the specified Azure Batch account. Currently, only tags can be updated.Set-AzureRMBatchAccountAccountNameSpecifies the name of the existing Batch account to update.StringTagSpecifies tags in an array of hash tables to set on the account.Hashtable[]ProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileResourceGroupNameSpecifies the resource group of the account being updated.StringAccountNameSpecifies the name of the existing Batch account to update.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneResourceGroupNameSpecifies the resource group of the account being updated.StringStringnoneTagSpecifies tags in an array of hash tables to set on the account.Hashtable[]Hashtable[]noneBatchAccountContextExample 1: Update the tags on an existing Batch accountPS C:\>Set-AzureRMBatchAccount -AccountName "cmdletexample" -Tag @(@{Name = "tag1";Value = "value1"},@{Name = "tag2";Value = "value2"}) + Azure Resource Manager CmdletsUsing Windows Powershell with Resource ManagerSet-AzureRMBatchAccountUpdates the specified Batch account.SetAzureRMBatchAccountThe Set-AzureRMBatchAccount cmdlet updates the specified Azure Batch account. Currently, only tags can be updated.Set-AzureRMBatchAccountAccountNameSpecifies the name of the existing Batch account to update.StringTagSpecifies tags in an array of hash tables to set on the account.Hashtable[]ProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileResourceGroupNameSpecifies the resource group of the account being updated.StringAccountNameSpecifies the name of the existing Batch account to update.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneResourceGroupNameSpecifies the resource group of the account being updated.StringStringnoneTagSpecifies tags in an array of hash tables to set on the account.Hashtable[]Hashtable[]noneBatchAccountContextExample 1: Update the tags on an existing Batch accountPS C:\>Set-AzureRMBatchAccount -AccountName "cmdletexample" -Tag @(@{Name = "tag1";Value = "value1"},@{Name = "tag2";Value = "value2"}) AccountName Location ResourceGroupName Tags TaskTenantUrl ----------- -------- ----------------- ---- ------------- cmdletexample westus cmdletexamplerg {System.Collection https://cmdletexample.westus.batch.azure.com s.Hashtable, Syste m.Collections.Hash table} -This command updates the tags on the cmdletexample account.Get-AzureRMBatchAccountNew-AzureRMBatchAccountRemove-AzureRMBatchAccountRMAzure_Batch_CmdletsStart-AzureRMBatchPoolResizeStarts to resize a pool.StartAzureBatchPoolResizeThe Start-AzureRMBatchPoolResize cmdlet starts an Azure Batch resize operation on a pool.Start-AzureRMBatchPoolResizeIdSpecifies the ID of the pool that this cmdlet resizes.StringComputeNodeDeallocationOptionSpecifies a deallocation option for the resizing operation that this cmdlet starts.ComputeNodeDeallocationOptionProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileResizeTimeoutSpecifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops.TimeSpanBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet. BatchAccountContextTargetDedicatedSpecifies the target number of dedicated compute nodes.Int32BatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet. BatchAccountContextBatchAccountContextnoneComputeNodeDeallocationOptionSpecifies a deallocation option for the resizing operation that this cmdlet starts.ComputeNodeDeallocationOptionComputeNodeDeallocationOptionnoneIdSpecifies the ID of the pool that this cmdlet resizes.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneResizeTimeoutSpecifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops.TimeSpanTimeSpannoneTargetDedicatedSpecifies the target number of dedicated compute nodes.Int32Int32noneExample 1: Resize a pool to 12 nodesPS C:\>Start-AzureRMBatchPoolResize -Id "ContosoPool06" -TargetDedicated 12 -BatchContext $Context -This command starts a resize operation on the pool that has the ID ContosoPool06. The target for the operation is 12 dedicated compute nodes. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable. Example 2: Resize a pool using a deallocation optionPS C:\>Get-AzureRMBatchPool -Id "ContosoPool06" -BatchContext $Context | Start-AzureRMBatchPoolResize -TargetDedicated 5 -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption ([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $Context -This cmdlet resizes a pool to five dedicated compute nodes. The command gets the pool that has the ID ContosoPool06 by using the Get-AzureRMBatchPool cmdlet. The command passes that pool object to the current cmdlet by using the pipeline operator. The command starts a resize operation on the pool. The target is five dedicated compute nodes. The command specifies time-out period of one hour. The command specifies a deallocation option of Terminate.Get-AzureRMBatchAccountKeysGet-AzureRMBatchPoolStop-AzureRMBatchPoolResizeRMAzure_Batch_CmdletsStop-AzureRMBatchPoolResizeStops a pool resize operation.StopAzureBatchPoolResizeThe Stop-AzureRMBatchPoolResize cmdlet stops an Azure Batch resize operation on a pool.Stop-AzureRMBatchPoolResizeIdSpecifies the ID of the pool for which this cmdlet stops a resizing operation.StringProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet.BatchAccountContextBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet.BatchAccountContextBatchAccountContextnoneIdSpecifies the ID of the pool for which this cmdlet stops a resizing operation.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneExample 1: Stop resizing a poolPS C:\>Stop-AzureRMBatchPoolResize -Id "ContosoPool06" -BatchContext $Context -This command stops a resize operation on the pool that has the ID ContosoPool06. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable.Example 2: Stop resizing a pool by using the pipelinePS C:\>Get-AzureRMBatchPool -Id "ContosoPool06" -BatchContext $Context | Stop-AzureRMBatchPoolResize -BatchContext $Context -This example stops resizing a pool by using the pipeline operator. The command gets the pool that has the ID ContosoPool06 by using the Get-AzureRMBatchPool cmdlet. The command passes that pool object to the current cmdlet. The command stops the resize operation on that pool. Get-AzureRMBatchAccountKeysGet-AzureRMBatchPoolStart-AzureRMBatchPoolResizeRMAzure_Batch_Cmdlets +This command updates the tags on the cmdletexample account.Get-AzureRMBatchAccountNew-AzureRMBatchAccountRemove-AzureRMBatchAccountRMAzure_Batch_CmdletsStart-AzureBatchPoolResizeStarts to resize a pool.StartAzureBatchPoolResizeThe Start-AzureBatchPoolResize cmdlet starts an Azure Batch resize operation on a pool.Start-AzureBatchPoolResizeIdSpecifies the ID of the pool that this cmdlet resizes.StringComputeNodeDeallocationOptionSpecifies a deallocation option for the resizing operation that this cmdlet starts.ComputeNodeDeallocationOptionProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileResizeTimeoutSpecifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops.TimeSpanBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet. BatchAccountContextTargetDedicatedSpecifies the target number of dedicated compute nodes.Int32BatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet. BatchAccountContextBatchAccountContextnoneComputeNodeDeallocationOptionSpecifies a deallocation option for the resizing operation that this cmdlet starts.ComputeNodeDeallocationOptionComputeNodeDeallocationOptionnoneIdSpecifies the ID of the pool that this cmdlet resizes.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneResizeTimeoutSpecifies a time-out period for the resizing operation. If the pool does not reach the target size by this time, the resize operation stops.TimeSpanTimeSpannoneTargetDedicatedSpecifies the target number of dedicated compute nodes.Int32Int32noneExample 1: Resize a pool to 12 nodesPS C:\>Start-AzureBatchPoolResize -Id "ContosoPool06" -TargetDedicated 12 -BatchContext $Context +This command starts a resize operation on the pool that has the ID ContosoPool06. The target for the operation is 12 dedicated compute nodes. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable. Example 2: Resize a pool using a deallocation optionPS C:\>Get-AzureBatchPool -Id "ContosoPool06" -BatchContext $Context | Start-AzureBatchPoolResize -TargetDedicated 5 -ResizeTimeout ([TimeSpan]::FromHours(1)) -ComputeNodeDeallocationOption ([Microsoft.Azure.Batch.Common.ComputeNodeDeallocationOption]::Terminate) -BatchContext $Context +This cmdlet resizes a pool to five dedicated compute nodes. The command gets the pool that has the ID ContosoPool06 by using the Get-AzureBatchPool cmdlet. The command passes that pool object to the current cmdlet by using the pipeline operator. The command starts a resize operation on the pool. The target is five dedicated compute nodes. The command specifies time-out period of one hour. The command specifies a deallocation option of Terminate.Get-AzureRMBatchAccountKeysGet-AzureBatchPoolStop-AzureBatchPoolResizeRMAzure_Batch_CmdletsStop-AzureBatchPoolResizeStops a pool resize operation.StopAzureBatchPoolResizeThe Stop-AzureBatchPoolResize cmdlet stops an Azure Batch resize operation on a pool.Stop-AzureBatchPoolResizeIdSpecifies the ID of the pool for which this cmdlet stops a resizing operation.StringProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet.BatchAccountContextBatchContextSpecifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext object that contains access keys for your subscription, use the Get-AzureRMBatchAccountKeys cmdlet.BatchAccountContextBatchAccountContextnoneIdSpecifies the ID of the pool for which this cmdlet stops a resizing operation.StringStringnoneProfileSpecifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.AzureProfileAzureProfilenoneExample 1: Stop resizing a poolPS C:\>Stop-AzureBatchPoolResize -Id "ContosoPool06" -BatchContext $Context +This command stops a resize operation on the pool that has the ID ContosoPool06. Use the Get-AzureRMBatchAccountKeys cmdlet to assign a context to the $Context variable.Example 2: Stop resizing a pool by using the pipelinePS C:\>Get-AzureBatchPool -Id "ContosoPool06" -BatchContext $Context | Stop-AzureBatchPoolResize -BatchContext $Context +This example stops resizing a pool by using the pipeline operator. The command gets the pool that has the ID ContosoPool06 by using the Get-AzureBatchPool cmdlet. The command passes that pool object to the current cmdlet. The command stops the resize operation on that pool. Get-AzureRMBatchAccountKeysGet-AzureBatchPoolStart-AzureBatchPoolResizeRMAzure_Batch_Cmdlets - Enable-AzureRMBatchAutoScale + Enable-AzureBatchAutoScale Enables automatic scaling on the specified pool. @@ -7099,7 +7099,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Enable-AzureRMBatchAutoScale + Enable-AzureBatchAutoScale Id @@ -7223,7 +7223,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: $formula = 'totalNodes=($CPUPercent.GetSamplePercent(TimeInterval_Minute*0,TimeInterval_Minute*10)<0.7?5:(min($CPUPercent.GetSample(TimeInterval_Minute*0, TimeInterval_Minute*10))>0.8?($CurrentDedicated*1.1):$CurrentDedicated));$TargetDedicated=min(100,totalNodes);'; - Enable-AzureRMBatchAutoScale "myPool" $formula -BatchContext $context + Enable-AzureBatchAutoScale "myPool" $formula -BatchContext $context Description @@ -7426,7 +7426,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchAutoScale + Disable-AzureBatchAutoScale Disables automatic scaling on the specified pool. @@ -7444,7 +7444,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchAutoScale + Disable-AzureBatchAutoScale Id @@ -7547,7 +7547,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Disable-AzureRMBatchAutoScale "myPool" -BatchContext $context + Disable-AzureBatchAutoScale "myPool" -BatchContext $context Description @@ -7576,7 +7576,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Restart-AzureRMBatchComputeNode + Restart-AzureBatchComputeNode Reboots the specified compute node. @@ -7594,7 +7594,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Restart-AzureRMBatchComputeNode + Restart-AzureBatchComputeNode PoolId @@ -7625,7 +7625,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Restart-AzureRMBatchComputeNode + Restart-AzureBatchComputeNode ComputeNode @@ -7774,7 +7774,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Restart-AzureRMBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context + Restart-AzureBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context Description @@ -7800,7 +7800,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Get-AzureRMBatchComputeNode -PoolId "myPool" -BatchContext $context | Restart-AzureRMBatchComputeNode -BatchContext $context + Get-AzureBatchComputeNode -PoolId "myPool" -BatchContext $context | Restart-AzureBatchComputeNode -BatchContext $context Description @@ -7829,7 +7829,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Reset-AzureRMBatchComputeNode + Reset-AzureBatchComputeNode Reinstalls the operating system on the specified compute node. @@ -7847,7 +7847,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Reset-AzureRMBatchComputeNode + Reset-AzureBatchComputeNode PoolId @@ -7878,7 +7878,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Reset-AzureRMBatchComputeNode + Reset-AzureBatchComputeNode ComputeNode @@ -8027,7 +8027,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Reset-AzureRMBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context + Reset-AzureBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context Description @@ -8053,7 +8053,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Get-AzureRMBatchComputeNode -PoolId "myPool" -BatchContext $context | Reset-AzureRMBatchComputeNode -BatchContext $context + Get-AzureBatchComputeNode -PoolId "myPool" -BatchContext $context | Reset-AzureBatchComputeNode -BatchContext $context Description @@ -8082,7 +8082,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Set-AzureRMBatchPoolOSVersion + Set-AzureBatchPoolOSVersion Changes the operating system version of the specified pool. @@ -8100,7 +8100,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Set-AzureRMBatchPoolOSVersion + Set-AzureBatchPoolOSVersion Id @@ -8223,7 +8223,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Set-AzureRMBatchPoolOSVersion -Id "myPool" -TargetOSVersion "WA-GUEST-OS-4.20_201505-01" -BatchContext $context + Set-AzureBatchPoolOSVersion -Id "myPool" -TargetOSVersion "WA-GUEST-OS-4.20_201505-01" -BatchContext $context Description @@ -8252,7 +8252,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Enable-AzureRMBatchJobSchedule + Enable-AzureBatchJobSchedule Enables the specified job schedule. @@ -8270,7 +8270,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Enable-AzureRMBatchJobSchedule + Enable-AzureBatchJobSchedule Id @@ -8373,7 +8373,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Enable-AzureRMBatchJobSchedule "myJobSchedule" -BatchContext $context + Enable-AzureBatchJobSchedule "myJobSchedule" -BatchContext $context Description @@ -8402,7 +8402,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchJobSchedule + Disable-AzureBatchJobSchedule Disables the specified job schedule @@ -8420,7 +8420,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchJobSchedule + Disable-AzureBatchJobSchedule Id @@ -8523,7 +8523,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Disable-AzureRMBatchJobSchedule "myJobSchedule" -BatchContext $context + Disable-AzureBatchJobSchedule "myJobSchedule" -BatchContext $context Description @@ -8552,7 +8552,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Enable-AzureRMBatchJob + Enable-AzureBatchJob Enables the specified job. @@ -8570,7 +8570,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Enable-AzureRMBatchJob + Enable-AzureBatchJob Id @@ -8673,7 +8673,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Enable-AzureRMBatchJob "myJob" -BatchContext $context + Enable-AzureBatchJob "myJob" -BatchContext $context Description @@ -8702,7 +8702,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchJob + Disable-AzureBatchJob Disables the specified job. @@ -8720,7 +8720,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Disable-AzureRMBatchJob + Disable-AzureBatchJob Id @@ -8843,7 +8843,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Disable-AzureRMBatchJob "myJob" Terminate -BatchContext $context + Disable-AzureBatchJob "myJob" Terminate -BatchContext $context Description @@ -8872,7 +8872,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchJobSchedule + Stop-AzureBatchJobSchedule Terminates the specified job schedule. @@ -8890,7 +8890,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchJobSchedule + Stop-AzureBatchJobSchedule Id @@ -8993,7 +8993,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Stop-AzureRMBatchJobSchedule "myJobSchedule" -BatchContext $context + Stop-AzureBatchJobSchedule "myJobSchedule" -BatchContext $context Description @@ -9022,7 +9022,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchJob + Stop-AzureBatchJob Terminates the specified job. @@ -9040,7 +9040,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchJob + Stop-AzureBatchJob Id @@ -9163,7 +9163,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Stop-AzureRMBatchJob "myJob" "No more tasks to run" -BatchContext $context + Stop-AzureBatchJob "myJob" "No more tasks to run" -BatchContext $context Description @@ -9192,7 +9192,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchTask + Stop-AzureBatchTask Terminates the specified task. @@ -9210,7 +9210,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchTask + Stop-AzureBatchTask JobId @@ -9234,11 +9234,11 @@ cmdletexample westus cmdletexamplerg {System.Collection https: - Stop-AzureRMBatchTask + Stop-AzureBatchTask Task - The PSCloudTask object representing the task to terminate. Use the Get-AzureRMBatchTask cmdlet to get a PSCloudTask object. + The PSCloudTask object representing the task to terminate. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object. PSCloudTask @@ -9269,7 +9269,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: Task - The PSCloudTask object representing the task to terminate. Use the Get-AzureRMBatchTask cmdlet to get a PSCloudTask object. + The PSCloudTask object representing the task to terminate. Use the Get-AzureBatchTask cmdlet to get a PSCloudTask object. PSCloudTask @@ -9363,7 +9363,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Stop-AzureRMBatchTask "myJob" "myTask" -BatchContext $context + Stop-AzureBatchTask "myJob" "myTask" -BatchContext $context Description @@ -9388,7 +9388,7 @@ cmdletexample westus cmdletexamplerg {System.Collection https: C:\PS> - Get-AzureRMBatchTask "myJob" "myTask" -BatchContext $context | Stop-AzureRMBatchTask -BatchContext $context + Get-AzureBatchTask "myJob" "myTask" -BatchContext $context | Stop-AzureBatchTask -BatchContext $context Description diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs index 07c0805009a8..313739403a1a 100644 --- a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs +++ b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs @@ -18,26 +18,24 @@ public class Constants { public const int DefaultMaxCount = 1000; - // Cmdlet nouns + // ARM cmdlet nouns + public const string AzureRMBatchAccount = "AzureRMBatchAccount"; + public const string AzureRMBatchAccountKey = "AzureRMBatchAccountKey"; + public const string AzureRMBatchAccountKeys = "AzureRMBatchAccountKeys"; - public const string AzureBatchAccount = "AzureRMBatchAccount"; - public const string AzureBatchAccountKey = "AzureRMBatchAccountKey"; - public const string AzureBatchAccountKeys = "AzureRMBatchAccountKeys"; - - - - public const string AzureBatchPool = "AzureRMBatchPool"; - public const string AzureBatchPoolResize = "AzureRMBatchPoolResize"; - public const string AzureBatchComputeNode = "AzureRMBatchComputeNode"; - public const string AzureBatchComputeNodeUser = "AzureRMBatchComputeNodeUser"; - public const string AzureBatchJobSchedule = "AzureRMBatchJobSchedule"; - public const string AzureBatchJob = "AzureRMBatchJob"; - public const string AzureBatchTask = "AzureRMBatchTask"; - public const string AzureBatchNodeFile = "AzureRMBatchNodeFile"; - public const string AzureBatchNodeFileContent = "AzureRMBatchNodeFileContent"; - public const string AzureBatchRemoteDesktopProtocolFile = "AzureRMBatchRemoteDesktopProtocolFile"; - public const string AzureBatchAutoScale = "AzureRMBatchAutoScale"; - public const string AzureBatchPoolOSVersion = "AzureRMBatchPoolOSVersion"; + // Batch Service cmdlet nouns + public const string AzureBatchPool = "AzureBatchPool"; + public const string AzureBatchPoolResize = "AzureBatchPoolResize"; + public const string AzureBatchComputeNode = "AzureBatchComputeNode"; + public const string AzureBatchComputeNodeUser = "AzureBatchComputeNodeUser"; + public const string AzureBatchJobSchedule = "AzureBatchJobSchedule"; + public const string AzureBatchJob = "AzureBatchJob"; + public const string AzureBatchTask = "AzureBatchTask"; + public const string AzureBatchNodeFile = "AzureBatchNodeFile"; + public const string AzureBatchNodeFileContent = "AzureBatchNodeFileContent"; + public const string AzureBatchRemoteDesktopProtocolFile = "AzureBatchRemoteDesktopProtocolFile"; + public const string AzureBatchAutoScale = "AzureBatchAutoScale"; + public const string AzureBatchPoolOSVersion = "AzureBatchPoolOSVersion"; // Parameter sets public const string IdParameterSet = "Id"; diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs index 922c69bc2a84..bb420a7c6af2 100644 --- a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs @@ -878,96 +878,6 @@ public void GetResourceWithIncorrectTypeThrowsException() Assert.Throws(() => resourcesClient.FilterPSResources(parameters)); } - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void NewResourceGroupFailsWithInvalidDeployment() - { - Uri templateUri = new Uri("http://templateuri.microsoft.com"); - Deployment deploymentFromGet = new Deployment(); - Deployment deploymentFromValidate = new Deployment(); - CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() - { - ResourceGroupName = resourceGroupName, - Location = resourceGroupLocation, - DeploymentName = deploymentName, - TemplateFile = templateFile, - StorageAccountName = storageAccountName, - ConfirmAction = ConfirmAction - }; - resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult - { - Exists = false - })); - - resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( - parameters.ResourceGroupName, - It.IsAny(), - new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult - { - ResourceGroup = new ResourceGroupExtended() { Name = parameters.ResourceGroupName, Location = parameters.Location } - })); - resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult - { - ResourceGroup = new ResourceGroupExtended() { Location = resourceGroupLocation } - })); - deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult - { - RequestId = requestId - })) - .Callback((string name, string dName, Deployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); - deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new DeploymentGetResult - { - Deployment = new DeploymentExtended() - { - Name = deploymentName, - Properties = new DeploymentPropertiesExtended() - { - Mode = DeploymentMode.Incremental, - ProvisioningState = ProvisioningState.Succeeded - }, - } - })); - deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse - { - Error = new ResourceManagementErrorWithDetails() - { - Code = "404", - Message = "Awesome error message", - Target = "Bad deployment" - } - })) - .Callback((string rg, string dn, Deployment d, CancellationToken c) => { deploymentFromValidate = d; }); - SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new GenericResourceExtended() { Name = "website" } }); - deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) - .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult - { - Operations = new List() - { - new DeploymentOperation() - { - OperationId = Guid.NewGuid().ToString(), - Properties = new DeploymentOperationProperties() - { - ProvisioningState = ProvisioningState.Succeeded, - TargetResource = new TargetResource() - { - ResourceName = resourceName, - ResourceType = "Microsoft.Website" - } - } - } - } - })); - - Assert.Throws(() => resourcesClient.CreatePSResourceGroup(parameters)); - } - [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestTemplateShowsErrorMessage() @@ -1304,9 +1214,6 @@ public void NewResourceGroupWithDeploymentSucceeds() Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Properties.Mode); Assert.NotNull(deploymentFromGet.Properties.Template); - Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Properties.Mode); - Assert.NotNull(deploymentFromValidate.Properties.Template); - progressLoggerMock.Verify( f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", "Microsoft.Website", @@ -1417,8 +1324,6 @@ public void CreatesResourceGroupWithDeploymentFromTemplateParameterObject() // Skip: Test produces different outputs since hashtable order is not guaranteed. //EqualsIgnoreWhitespace(File.ReadAllText(templateParameterFile), deploymentFromGet.Parameters); - Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Properties.Mode); - Assert.NotNull(deploymentFromValidate.Properties.Template); // Skip: Test produces different outputs since hashtable order is not guaranteed. //EqualsIgnoreWhitespace(File.ReadAllText(templateParameterFile), deploymentFromValidate.Parameters); @@ -1524,9 +1429,6 @@ public void ShowsFailureErrorWhenResourceGroupWithDeploymentFails() Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Properties.Mode); Assert.NotNull(deploymentFromGet.Properties.Template); - Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Properties.Mode); - Assert.NotNull(deploymentFromValidate.Properties.Template); - errorLoggerMock.Verify( f => f(string.Format("Resource {0} '{1}' failed with message '{2}'", "Microsoft.Website", @@ -1632,9 +1534,6 @@ public void ExtractsErrorMessageFromFailedDeploymentOperation() Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Properties.Mode); Assert.NotNull(deploymentFromGet.Properties.Template); - Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Properties.Mode); - Assert.NotNull(deploymentFromValidate.Properties.Template); - errorLoggerMock.Verify( f => f(string.Format("Resource {0} '{1}' failed with message '{2}'", "Microsoft.Website", diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs index d8d71cac373f..98d8fe40b98f 100644 --- a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs @@ -303,20 +303,6 @@ public virtual PSResourceGroupDeployment ExecuteDeployment(CreatePSResourceGroup { parameters.DeploymentName = GenerateDeploymentName(parameters); Deployment deployment = CreateBasicDeployment(parameters, parameters.DeploymentMode); - TemplateValidationInfo validationInfo = CheckBasicDeploymentErrors(parameters.ResourceGroupName, parameters.DeploymentName, deployment); - - if (validationInfo.Errors.Count != 0) - { - int counter = 1; - string errorFormat = "Error {0}: Code={1}; Message={2}\r\n"; - StringBuilder errorsString = new StringBuilder(); - validationInfo.Errors.ForEach(e => errorsString.AppendFormat(errorFormat, counter++, e.Code, e.Message)); - throw new ArgumentException(errorsString.ToString()); - } - else - { - WriteVerbose(ProjectResources.TemplateValid); - } if (!string.IsNullOrEmpty(parameters.StorageAccountName)) {