【发布时间】:2016-07-25 17:24:36
【问题描述】:
我一直在使用来自https://github.com/Azure-Samples/service-fabric-dotnet-web-reference-app 的代码为我们当前的项目创建备份,但我无法使用 power shell 脚本调用数据丢失方法来触发恢复。
有没有人有这方面的经验或有其他方法来创建备份和恢复它们?
【问题讨论】:
标签: c# backup azure-service-fabric
我一直在使用来自https://github.com/Azure-Samples/service-fabric-dotnet-web-reference-app 的代码为我们当前的项目创建备份,但我无法使用 power shell 脚本调用数据丢失方法来触发恢复。
有没有人有这方面的经验或有其他方法来创建备份和恢复它们?
【问题讨论】:
标签: c# backup azure-service-fabric
您遇到的问题是什么?
特定 CmdLet is here 的文档。
有关如何安装 Azure Cmdlet is here 的指南。
您还需要登录 Azure 并确保您指向正确的租户。下面是一些帮助解决此问题的代码。提供有关您收到的错误的更多详细信息,这将有助于人们给出更具体的答案。
# To login to Azure Resource Manager
Login-AzureRmAccount
# You can also use a specific Tenant if you would like a faster login experience
# Login-AzureRmAccount -TenantId xxxx
# To view all subscriptions for your account
Get-AzureRmSubscription
# To select a default subscription for your current session
Get-AzureRmSubscription –SubscriptionName “Free Trial” | Select-AzureRmSubscription
# View your current Azure PowerShell session context
# This session state is only applicable to the current session and will not affect other sessions
Get-AzureRmContext
【讨论】: