New-AzureADPolicy missed in the Azure cloud shell
Asked Answered
H

1

7

New-AzureADPolicy missed in the Azure cloud shell

New-AzureADPolicy : The term 'New-AzureADPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Also if try to install AzureADPreview

Install-Module -Name AzureADPreview

The result is:

PackageManagement\Install-Package : Unable to load shared library 'api-ms-win-core-sysinfo-l1-1-0.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libapi-ms-win-core-sysinfo-l1-1-0.dll: cannot open shared object file: No such file or directory

Is it possible to work somehow with Azure AD in the web cloud shell?

Hiedihiemal answered 9/8, 2019 at 9:27 Comment(7)
It is not support to install module in cloud shell, you could just install it in local.Flunkey
but maybe one month ago it was available command and I use claim mapping policy, also I have the same errors locallyHiedihiemal
You mean Install-Module -Name AzureADPreview works in cloud shell one month ago? AFAIK, the cloud shell never supports to install module.Flunkey
I mean New-AzureADPolicy was available beforeHiedihiemal
Also if Install-Module -Name AzureADPreview locally the same error on windows 10Hiedihiemal
what is your powershell version?Flunkey
Locally 5.1.17134.858 Web 6.2.2Hiedihiemal
M
3

AzureAD Module is included in Azure cloud shell, but New-AzureADPolicy is now only exist in AzureADPreview Module and we can not install this Module in Azure cloud shell. So we can not run New-AzureADPolicy in Azure cloud shell.

But we can run most AzureAD command list here in Azure cloud shell, no need to install AzureAD module.

Monaural answered 28/8, 2019 at 9:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.