我使用Save-AzureRmProfile为我的所有脚本并行执行azure请求。 我从powershell /自动登录到azure借用了这个想法
我不得不将我的系统更新到最新版本(AzureRM> 4),尽管AzureRmProfile现在是AzureRmContext cmdlet,但我仍然无法像以前那样使用它。
脚本
打开PS控制台并执行
Save-AzureRmContext -Profile (Add-AzureRmAccount) -Path myprofile.json # List my VMs Get-AzureRmVm打开第二个PS控制台
Import-AzureRmContext -Path myprofile.json # List my VMs Get-AzureRmVm Get-AzureRmVM : Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.如何重用我的配置文件以并行执行加载?
I was using Save-AzureRmProfile for all my scripts to execute azure requests in parallel. I borrowed this idea from auto login to azure with powershell/
I had to update my systems to latest version (AzureRM > 4) and despite the fact that the AzureRmProfile are now AzureRmContext cmdlets I still cannot use it as before.
Scenario
Open a PS console and execute
Save-AzureRmContext -Profile (Add-AzureRmAccount) -Path myprofile.json # List my VMs Get-AzureRmVmOpen a second PS console
Import-AzureRmContext -Path myprofile.json # List my VMs Get-AzureRmVm Get-AzureRmVM : Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.How can I reuse my profile to be loaded in parallel executions?
最满意答案
cmdlet中存在一个错误。 你做的不多(只有降级)。
在此处跟踪: https : //github.com/Azure/azure-powershell/issues/3954
There's a bug in the cmdlets. Not much you can do (only downgrade).
Track it here: https://github.com/Azure/azure-powershell/issues/3954
更多推荐
azure,执行,PS,credentials,电脑培训,计算机培训,IT培训"/> <meta name="descr
发布评论