Skip to content

Commit c89ba57

Browse files
committed
Adding missing methods to storage script cmdlets
1 parent 5a3f209 commit c89ba57

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/AzureRM.Storage.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,31 @@ function New-AzureRmStorageAccount
4343

4444
}
4545

46+
function Set-AzureRmStorageAccount
47+
{
48+
[CmdletBinding()]
49+
param(
50+
[string] [Parameter(Position=0, ValueFromPipelineByPropertyName=$true)] $ResourceGroupName,
51+
[string] [Parameter(Position=1, ValueFromPipelineByPropertyName=$true)][alias("StorageAccountName")] $Name,
52+
[string] [Parameter(Position=2, ValueFromPipelineByPropertyName=$true)] $Location,
53+
[string] [Parameter(Position=3, ValueFromPipelineByPropertyName=$true)] $Type,
54+
[Hashtable[]] [Parameter(Position=4, ValueFromPipelineByPropertyName=$true)] $Tags)
55+
BEGIN {
56+
$context = Get-Context
57+
$client = Get-StorageClient $context
58+
}
59+
PROCESS {
60+
$createParms = New-Object -Type Microsoft.Azure.Management.Storage.Models.StorageAccountUpdateParameters
61+
$createParms.AccountType = [Microsoft.Azure.Management.Storage.Models.AccountType]::StandardLRS
62+
$createParms.Location = $Location
63+
$getTask = $client.StorageAccounts.UpdateAsync($ResourceGroupName, $Name, $createParms, [System.Threading.CancellationToken]::None)
64+
$sa = $getTask.Result
65+
}
66+
END {}
67+
68+
}
69+
70+
4671
function Get-AzureRmStorageAccountKey
4772
{
4873
[CmdletBinding()]

0 commit comments

Comments
 (0)