微软已将 Azure PowerShell 1.0 Preview 发布到了 PowerShell Gallery,此次发布的预览版有许多变化,微软主要用其来收集反馈意义并纳入到正式的 Azure PowerShell 1.0 中。
注意:此预览版不适合用于关键业务,如果你在生产环境中进行使用,建议还是保留在 Azure PowerShell 0.9.8 版本。
Azure PowerShell 团队对 Azure PowerShell 1.0 的功能更新主要如下:
- 更好的支持 Azure Automation 的 Resource Manager 功能
- 单独的 Azure 服务管理和 Resource Manager 功能,相关 Azure cmdlets 更有条理和易用
- Azure PowerShell 通过 WebPI 和 PowerShell Gallery 完成新功能的更快交付
- 自动化的 Azure PowerShell MSDN 参考文档
安装和导入Azure PowerShell 1.0 Preview
要安装 Azure PowerShell 1.0 Preview 需要用到 PowerShellGet,因此需要提前安装 Windows Management Framework 5.0 (Windows 10默认已集成)。
使用 PowerShellGet 安装 Azure PowerShell 1.0 Preview 的命令如下:
# 通过 PowerShell Gallery 安装 Azure Resource Manager modules Install-Module AzureRM Install-AzureRM # 通过 PowerShell Gallery 安装 Azure Service Management module Install-Module Azure
完成 Azure PowerShell 1.0 Preview 安装之后,即可导入 Azure 和 AzureRM modules。
# 导入 AzureRM.* modules Import-AzureRM # 单独导入 AzureRM module Import-Module AzureRM.Compute # 导入 Azure Service Management Import-Module Azure
使用 Resource Manager
# 登录到 Azure Resource Manager Login-AzureRmAccount # 查看所有订阅 Get-AzureRmSubscription # 设定当前会话下的默认订阅 Get-AzureRmSubscription –SubscriptionName “your sub” | Select-AzureRmSubscription # 选择当前会议的默认存储 Set-AzureRmCurrentStorageAccount –ResourceGroupName “your resource group” –StorageAccountName “your storage account name” # 导入 Azure.Storage 模块 Import-Module Azure.Storage # 列出所有容器下的 blobs Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob
使用 Service Management
# 导入 Azure Service Management module Import-Module Azure # 登录到 Azure Service Management Add-AzureAccount # 列出所有虚拟机 Get-AzureVM
最新评论
应用安装失败,错误消息: 从 (Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe.Appx) 使用程序包 Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe 中的目标卷 C: 执行的部署 Add 操作失败,错误为 0x80040154。有关诊断应用部署问题的帮助,请参阅 http://go.microsoft.com/fwlink/?LinkId=235160。 (0x80040154)
之前装双系统时关了BitLocker,后来找不大设备加密了(原本有的)是怎么回事
补充一下哈,如果大家想看得更为完整。可以输入: slmgr.vbs -xpr 查询Windows是否永久激活 slmgr.vbs -dli 查询到操作系统版本、通过激活的渠道、后五位产品密钥、许可证状态等信息 slmgr.vbs -dlv 查询所有Windows的激活信息,包括:激活ID、安装ID、激活截止日期等信息
可能性太多了,有可能是兼容性问题。先更新一下「手机连接」应用试试。