Azure active directory Azure AD PowerShell(云):对象引用未设置为对象的实例

Azure active directory Azure AD PowerShell(云):对象引用未设置为对象的实例,azure-active-directory,appsource,Azure Active Directory,Appsource,我正在尝试使用Azure AD PowerShell生成邀请链接。我正在使用新的AzureADMSInvitation方法() 我在cloud shell中运行它,并得到以下错误: PS Azure:\> New-AzureADMSInvitation cmdlet New-AzureADMSInvitation at command pipeline position 1 Supply values for the following parameters: InvitedUserEm

我正在尝试使用Azure AD PowerShell生成邀请链接。我正在使用新的AzureADMSInvitation方法()

我在cloud shell中运行它,并得到以下错误:

PS Azure:\> New-AzureADMSInvitation

cmdlet New-AzureADMSInvitation at command pipeline position 1
Supply values for the following parameters:
InvitedUserEmailAddress: "**@**.com"
InviteRedirectUrl: "**.com"
New-AzureADMSInvitation : Object reference not set to an instance of an object.
At line:1 char:1
+ New-AzureADMSInvitation
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureADMSInvitation], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Open.MSGraphV10.PowerShell.NewAzureADMSInvitation

我尝试重新启动shell,没有在输入中包含引号,但没有成功。有人能绕过这个问题吗?

看来我们不能在Cloud Shell(Powershell)中使用这个命令。我还建议你可以把你的想法发布在。Azure团队将对其进行审查

此外,您可以尝试在本地计算机上使用此powershell命令。 确保您已使用

只需尝试输入以下powershell脚本:


New AzureADMSInvitation-InvitedUserEmailAddress您能在自己的机器上而不是在cloud shell上运行它吗?我使用cloud shell是因为我没有windows机器。在使用cloud shell之前,我尝试了OSx和Linux PowerShell安装,但它们没有新的AzureAdmsVitiation功能。看来我需要追踪windows操作系统或使用虚拟机,谢谢你的帮助。