Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install-Module AzureAD on linux failes #5274

Closed
hoffmann opened this issue Oct 30, 2017 · 27 comments
Closed

Install-Module AzureAD on linux failes #5274

hoffmann opened this issue Oct 30, 2017 · 27 comments
Labels
Resolution-External The issue is caused by external component(s).

Comments

@hoffmann
Copy link

hoffmann commented Oct 30, 2017

Steps to reproduce

PS> Install-Module AzureAD 

Expected behavior

Installation of AzureAD module

Actual behavior

PS> Install-Module AzureAD                                                              
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
 InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install 
the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PackageManagement\Install-Package : Unable to load DLL 'api-ms-win-core-sysinfo-l1-1-0.dll': The      specified module or one of its dependencies could not be found.                                        (Exception from HRESULT: 0x8007007E)                                                                 At /opt/microsoft/powershell/6.0.0-beta.9/Modules/PowerShellGet/1.5.0.0/PSModule.psm1:1877 char:21    + ...          $null = PackageManagement\Install-Package @PSBoundParameters                           
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Inst 
   all-Package], Exception
    + FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleMa 
   nifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
 

Environment data

# pwsh 
PowerShell v6.0.0-beta.9
Copyright (C) Microsoft Corporation. All rights reserved.
> $PSVersionTable

Name                           Value                                                                                
----                           -----                                                                                
PSVersion                      6.0.0-beta.9                                                                         
PSEdition                      Core                                                                                 
GitCommitId                    v6.0.0-beta.9                                                                        
OS                             Linux 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017           
Platform                       Unix                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                              
PSRemotingProtocolVersion      2.3                                                                                  
SerializationVersion           1.1.0.1                                                                              
WSManStackVersion              3.0  
@markekraus markekraus added the Resolution-External The issue is caused by external component(s). label Oct 30, 2017
@markekraus
Copy link
Contributor

The AzureAD module is not compatible with non-windows platforms. I believe it is still using ADAL which has WinForms dependencies. According to the project page (https://docs.microsoft.com/en-us/powershell/module/Azuread/?view=azureadps-2.0) these are the supported OSes:

Windows 10 Windows 8.1 Pro Windows 8.1 Enterprise Windows 7 SP1 Windows Server 2016 TP5 Windows Server 2012 R2 Windows Server 2008 R2 SP1

You may want to request Linux compatibility on the Azure AD Uservoice: https://feedback.azure.com/forums/169401-azure-active-directory

@alexandair
Copy link
Contributor

Cross-platform AzureAD module is work in progress. You can use the preview version (AzureAD.Standard.Preview) in Azure Cloud Shell.

@prasannabj
Copy link

prasannabj commented Nov 1, 2018

Do we have any AzureAD standard preview version to test on PowerShell Core 6.1?

Can PowerShell Core execute these AzureAD standard module, if PowerShell Core is hosted on Windows environment?

@archmangler
Copy link

Hi, it appears this is still not possible on pwsh?

PS /home/> Install-module AzureADPreview

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
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                                                                                                                                                                                         At /opt/microsoft/powershell/6/Modules/PowerShellGet/PSModule.psm1:9491 char:21                                                                                                                                                                               + ...          $null = PackageManagement\Install-Package @PSBoundParameters                                                                                                                                                                                   +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage



@xhoy
Copy link

xhoy commented Jul 1, 2019

Shoudn't this issue be still open since it is not fixed???

@vexx32
Copy link
Collaborator

vexx32 commented Jul 1, 2019

This module is not owned or managed by anyone in this repo, and development of it is not related to this repo. As mentioned, the preview version of the module can be used in the meantime if you so wish, but apart from that we can only wait for the Azure team to release a more complete version of the module. 🙂

@nkhine
Copy link

nkhine commented Oct 8, 2019

I also have this error:

PS /home/khine> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.3
PSEdition                      Core
GitCommitId                    6.2.3
OS                             Linux 5.0.0-29-generic #31-Ubuntu SMP Thu Sep 12 13:05:32 UTC 2019
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS /home/khine> Install-module AzureADPreview

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to 
install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
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                                                                       At /snap/powershell/39/opt/powershell/Modules/PowerShellGet/PSModule.psm1:9508 char:21                                                                                                               + ...          $null = PackageManagement\Install-Package @PSBoundParameters                                                                                                                          +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                          
+ CategoryInfo          : NotSpecified: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
 

any news on this?

@mitpwd
Copy link

mitpwd commented Oct 11, 2019

This is a really poor follow up by Microsoft.

@chrsdrhm
Copy link

Yeah this is also broken on macOS... same error as indicated above on Linux.

@ghost
Copy link

ghost commented Oct 19, 2019

Same issue here

PS /Users/stuartlupton> $PSVersionTable

Name Value


PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Darwin 19.0.0 Darwin Kernel Version 19.0.0: Tue Sep 17 01:59:51 PDT 2019; root:xnu-6153.11.24~17/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

PS /Users/stuartlupton> Install-Module -Name AzureAD

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the
Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
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 DYLD_PRINT_LIBRARIES environment variable: dlopen(libapi-ms-win-core-sysinfo-l1-1-0.dll, 1): image not found At /usr/local/microsoft/powershell/6/Modules/PowerShellGet/PSModule.psm1:9508 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters

  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

@chrsdrhm
Copy link

@dbsysteluk-stuartlupton I logged this issue #10326 a few days back on the Azure PowerShell repository

@Oortael60
Copy link

Is there a fix for this? I also have this problem:

Install-Module -Name AzureADPreview

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "N"):A
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
At /snap/powershell/39/opt/powershell/Modules/PowerShellGet/PSModule.psm1:9508 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

@bencarpena
Copy link

Any news here? I'm running it on my Mac and still getting the error below.

Unable to load DLL 'api-ms-win-core-sysinfo-l1-1-0.dll': The specified module or one of its dependencies could not be found.

@RileyMShea
Copy link

I know the repo has 2.1k issues that are open right now, but I'm also experiencing the issue and would be grateful for a resolution.

Ubuntu 19.10
PowerShell 7.0.0-preview.5

Install-Module AzureAd

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you 
want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): a
Install-Package: /snap/powershell-preview/51/opt/powershell/Modules/PowerShellGet/PSModule.psm1                                                                                          Line |   

```
Line 9683 $installedPackages = PackageManagement\Install-Package @PSBoundParameters                                                                                                 
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
```                                                                                                                                                                                

@HowardEdidin
Copy link

I am experiencing the same issue.

@nayr1991
Copy link

For anyone having issues with the Preview module, you can grab it from the poshtest gallery:

 Register-PackageSource -Trusted -ProviderName 'PowerShellGet' -Name 'Posh Test Gallery' -Location https://www.poshtestgallery.com/api/v2/

 Install-Module -Name AzureAD.Standard.Preview

@arpitjain099
Copy link

I am also facing the same issue. Please resolve.

@cless00
Copy link

cless00 commented Jan 13, 2020

same issue (#11229)

@su-panda
Copy link

same issue

@archmangler
Copy link

archmangler commented Jan 16, 2020 via email

@xom-pschiess
Copy link

Same issue, but in Cloud Shell. Is there a way to install the AzureAD Preview Module in Cloud Shell?

@alexandair
Copy link
Contributor

AzureAD Preview module is already installed in Cloud Shell.

@xom-pschiess
Copy link

AzureAD Preview module is already installed in Cloud Shell.

I'm unable to use commands such as Get-AzureADPolicy in Cloud Shell. It can't find the cmdlets

@alexandair
Copy link
Contributor

The only policy-related cmdlets in AzureAD.Standard.Preview module are:

PS Azure:\> Get-Command -Name *policy* -Module AzureAD.Standard.Preview

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Add-AzureADMSLifecyclePolicyGroup                  0.0.0.10   AzureAD.Standard.Preview
Cmdlet          Get-AzureADMSGroupLifecyclePolicy                  0.0.0.10   AzureAD.Standard.Preview
Cmdlet          Get-AzureADMSLifecyclePolicyGroup                  0.0.0.10   AzureAD.Standard.Preview
Cmdlet          New-AzureADMSGroupLifecyclePolicy                  0.0.0.10   AzureAD.Standard.Preview
Cmdlet          Remove-AzureADMSGroupLifecyclePolicy               0.0.0.10   AzureAD.Standard.Preview
Cmdlet          Remove-AzureADMSLifecyclePolicyGroup               0.0.0.10   AzureAD.Standard.Preview
Cmdlet          Set-AzureADMSGroupLifecyclePolicy                  0.0.0.10   AzureAD.Standard.Preview

@xom-pschiess
Copy link

xom-pschiess commented Jan 30, 2020

https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadpolicy?view=azureadps-2.0-preview

Here is the specific module that i'm looking to use in Cloud Shell

The Get-AzureADPolicy cmdlet gets a policy in Azure Active Directory (AD).

@erikanderson
Copy link

erikanderson commented Feb 28, 2020

On linux (centos7) installed powershell core and the AzureAD.Standard.Preview module (with some help from https://blogs.endjin.com/2019/05/how-to-use-the-azuread-module-in-powershell-core/).

Register-PackageSource -Name PoshTestGallery -Location https://www.poshtestgallery.com/api/v2/ -ProviderName PowerShellGet

Install-Module -Name AzureAD.Standard.Preview -RequiredVersion 0.0.0.10

Import-Module -Name /root/.local/share/powershell/Modules/AzureAD.Standard.Preview/0.0.0.10/AzureAD.Standard.Preview.psm1

This is working however as mentioned by others it is missing some cmdlets.

PS /home/*****> Get-AzureADMS*
Get-AzureADMSDeletedDirectoryObject  
Get-AzureADMSGroup                  
Get-AzureADMSIdentityProvider
Get-AzureADMSDeletedGroup           
Get-AzureADMSGroupLifecyclePolicy    
Get-AzureADMSLifecyclePolicyGroup

We require the Get-AzureADMSTrustFrameworkPolicy which is not present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-External The issue is caused by external component(s).
Projects
None yet
Development

No branches or pull requests