Powershell使用从linux到office365的SecureString

Powershell使用从linux到office365的SecureString,powershell,powershell-remoting,securestring,powershell-6.0,Powershell,Powershell Remoting,Securestring,Powershell 6.0,尝试使用Exchange powershell commandlet:New-MailUser()时遇到一些问题。 更具体地说,它使用的是失败的SecureString 我的问题是,它在我的windows dev env上运行良好,但一旦在Linux上执行,它就不会运行了。(都是powershell 6。甚至尝试了7) 我得到了以下错误: 会话密钥不可用于加密安全字符串 我想这是一个连接类型问题(SSL/TLS) (学习) 执行的命令: $session = New-PSSession -Con

尝试使用Exchange powershell commandlet:New-MailUser()时遇到一些问题。 更具体地说,它使用的是失败的SecureString

我的问题是,它在我的windows dev env上运行良好,但一旦在Linux上执行,它就不会运行了。(都是powershell 6。甚至尝试了7)

我得到了以下错误:

会话密钥不可用于加密安全字符串

我想这是一个连接类型问题(SSL/TLS) (学习)

执行的命令:

$session = New-PSSession -ConfigurationName:Microsoft.Exchange -Authentication:Basic -ConnectionUri:https://outlook.office365.com/powershell-liveid/ -Credential $credentials -AllowRedirection
Import-PSSession -Session $session

Invoke-Command -Session $s -ScriptBlock { New-MailUser -Name "Ed Meadows" -ExternalEmailAddress ed@tailspintoys.com -MicrosoftOnlineServicesID ed@tailspintoys -Password (ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force) }
我不知道如何解决这个问题,或者我做错了什么


有开明的人可以帮忙吗?

SecureString使用DPAPI进行加密,这在非Windows平台上。我没有看到thead,但我可以看到它在ps 6.2中被“启用”。无法解决此问题?SecureString使用DPAPI进行加密,这在非Windows平台上实现。没有看到thead,但我可以看到它已在ps 6.2中“启用”。没什么可以解决的?