ITPub博客

首页 > > > Azure PowerShell 创建Redis

Azure PowerShell 创建Redis

作者:Ruiyuan Li 时间:2016-08-02 00:00:00 0 删除 编辑

Azure Global中,redis的黄建管理可以通过Portal进行,非常方便。但是,目前为止,Azure China的Portal不支持创建管理Redis。一种可选的方案就是使用Powershell进行管理。

注意,本人使用的PowerShell版本号为1.0.1。可以通过命令:

Get-Module azure

获得当前的PowerShell版本。


登录Azure账户时,输入下面的代码,将会弹出一对话框,输入账户名密码即可。

$china = Get-AzureRmEnvironment -Name AzureChinaCloud; Login-AzureRmAccount -Environment $china

获得当前Redis列表:

Get-AzureRmRedisCache

创建Redis:

New-AzureRmRedisCache -ResourceGroupName ResourceGroupName -Name RedisName -Location "China East" -Sku Premium -Size P1

设置非ssl访问:

Set-AzureRmRedisCache -ResourceGroupName ResourceGroupName -Name RedisName -EnableNonSslPort $true

获得密钥:

Get-AzureRmRedisCacheKey -Name RedisName -ResourceGroupName ResourceName


转载请注明: » Azure PowerShell 创建Redis
<!-- -->

原文作者:;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-05-21

  • 博文量
    495
  • 访问量
    4825