Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.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
使用AZ Powershell模块注册本机应用程序_Powershell_Azure Active Directory_Registration_Nativeapplication - Fatal编程技术网

使用AZ Powershell模块注册本机应用程序

使用AZ Powershell模块注册本机应用程序,powershell,azure-active-directory,registration,nativeapplication,Powershell,Azure Active Directory,Registration,Nativeapplication,我需要使用AZ Powershell 6模块在Azure Active Directory上注册本机应用程序。 可以在AzureAD模块中使用命令New AzureADApplication注册本机应用程序,将字段“PublicClient”的值设置为true,但powershell 6不支持模块AzureAD 在powershell 6中,相应的命令似乎是New AzADApplication,它允许注册Web应用程序/API,但不允许注册本机应用程序 那么,如何在powershell 6中的

我需要使用AZ Powershell 6模块在Azure Active Directory上注册本机应用程序。 可以在AzureAD模块中使用命令New AzureADApplication注册本机应用程序,将字段“PublicClient”的值设置为true,但powershell 6不支持模块AzureAD

在powershell 6中,相应的命令似乎是New AzADApplication,它允许注册Web应用程序/API,但不允许注册本机应用程序

那么,如何在powershell 6中的模块AZ中注册本机应用程序呢


谢谢。

似乎不支持使用
Az
直接创建本机应用程序。Azure已发布名为的AzureAD模块的预览版本,该版本支持
Powershell Core 6
,此模块提供与
AzureAD
相同的功能。您可以像使用AzureAD一样使用它来创建本机应用程序

PowerShell画廊:


有关详细信息,请参阅:。

如果尝试安装模块-名称AzureAD.Standard.Preview,您将收到以下错误:

“PackageManager\Install Package:找不到与指定搜索条件和模块名称“AzureAD.Standard.Preview”匹配的程序包。请尝试获取PSRepository以查看所有可用的已注册模块存储库。
位于C:\program files\powershell\6\Modules\PowerShellGet\PSModule.psm1:9491 char:21
+…$null=PackageManager\Install Package@PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo:ObjectNotFound:(Microsoft.Power….InstallPackage:InstallPackage)[安装包],异常
+FullyQualifiedErrorId:NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManager.cmdlet.InstallPackage“
因此,您必须使用以下命令添加存储库:

PS> Register-PSRepository -Name PreviewRepository -SourceLocation 'https://www.poshtestgallery.com/api/v1'
然后安装并导入模块

PS> Install-Module -Name AzureAD.Standard.Preview
PS> Import-Module AzureAD.Standard.Preview
检查模块是否正确安装,所有命令是否已导入

PS> Get-Module -ListAvailable
请记住在登录AzureAD帐户之前始终调用
Connect AzureAD
,否则您将收到错误


感谢Joy Wang和他的问候。

AzureAD.Standard.Preview版本0.1.599.7在其导出的命令中没有cmdlet
Connect-AzureAD
。列表:
((获取模块'AzureAD.Standard.Preview')。导出命令)。键
PS> Get-Module -ListAvailable