Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 如何在会话之间保留AzurerAccount_Powershell_Azure - Fatal编程技术网

Powershell 如何在会话之间保留AzurerAccount

Powershell 如何在会话之间保留AzurerAccount,powershell,azure,Powershell,Azure,Add AzureRmAccount或别名Login AzureRmAccount似乎不像Add AzureAccount那样在会话之间持久存在 有没有办法让它持续下去?还没有,不是以你习惯的方式。。。这是一个已知的问题,但我在列表中找不到它。请随时将其添加到: 将帐户添加到会话后(添加AzurerAccount或登录AzurerAccount),使用 保存AzureRmProfile-路径 保存当前凭据和 Select-AzureRmProfile -Path <path-to-fil

Add AzureRmAccount
或别名
Login AzureRmAccount
似乎不像
Add AzureAccount
那样在会话之间持久存在


有没有办法让它持续下去?

还没有,不是以你习惯的方式。。。这是一个已知的问题,但我在列表中找不到它。请随时将其添加到:


将帐户添加到会话后(添加AzurerAccount或登录AzurerAccount),使用

保存AzureRmProfile-路径
保存当前凭据和

Select-AzureRmProfile -Path <path-to-file>
选择AzureRmProfile-路径
加载它们


也计划选择保存和加载凭据。我经历了存储的凭据在几周后过期的经历。每天都会执行使用此凭据的脚本。有办法解决此问题吗?请注意,在最新版本的Azure Powershell中,这些cmdlet已重命名为
Save-AzureRmContext
Import-AzureRmContext
Select-AzureRmProfile -Path <path-to-file>