gpt4 book ai didi

Azure Powershell 新-AzADUser : A parameter cannot be found that matches parameter name 'MobilePhone'

转载 作者:行者123 更新时间:2023-12-03 06:43:32 25 4
gpt4 key购买 nike

当我尝试使用以下命令通过 Azure 门户 powershell 创建新用户时(替换所有值):

New-AzADUser -DisplayName "DisplayName" -MailNickname "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="62070f030b0e22050f030b0e4c010d0f" rel="noreferrer noopener nofollow">[email protected]</a>" -UserPrincipalName "UserPrincipalName" -Mail "mail" -MobilePhone "+31000000" -Department "Department"

我收到以下错误:

New-AzADUser: A parameter cannot be found that matches parameter name 'MobilePhone'.

但是reading the docs确实显示对参数“MobilePhone”的支持。执行“Get-Help New-AzADUser”时也是如此。

enter image description here

有谁知道这可能是什么原因以及如何解决?

亲切的问候

最佳答案

我尝试通过 Azure 门户 PowerShell 创建一个新用户,结果如下所示:

connect-AzureAD
$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile
$PasswordProfile.Password = "xxxxxxx"
$mobile = "+xxxx000000"
New-AzureADUser -DisplayName "xxxUser" -PasswordProfile $PasswordProfile -UserPrincipalName "<UserPrincipalName>" -AccountEnabled $true -MailNickName "demouser" -Mobile $mobile

之前的尝试给我带来了同样的问题。

所以,我修改了参数通过引用 -MobilePhone-Mobile MSDoc

通过引用 article 中的 PSobject 创建了密码文件:

enter image description here

enter image description here

用户已在 Azure AD 中成功创建:

enter image description here

关于Azure Powershell 新-AzADUser : A parameter cannot be found that matches parameter name 'MobilePhone' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74315681/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com