Skip to content

Can't import-module Core AzureRM on Mac #4090

Description

@unbreakabl3

Hello,
When trying to import Azure Core modules, I am getting the following error on latest Mac OS:

Import-Module : Could not load file or assembly 'Microsoft.Azure.Commands.ResourceManager.Common, Version=1.6.0.0, Cultur
e=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
At line:1 char:1

  • Import-Module AzureRM.Profile.NetCore.Preview
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
    
    

$PSVersionTable

Name Value


PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.3
OS Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Activity

  1. januschr commented on Jun 24, 2017

    @januschr

    I get the same error. I first ran

    Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2 -ProviderName NuGet -ExcludeVersion -Destination /usr/local/share/powershell/Modules
    

    And after that Import-Module AzureRM.Profile.NetCore.Preview, where I get the same error as unbreakabl3.

    Get-Module -ListAvailable shows the following:

        Directory: /usr/local/share/powershell/Modules
    
    
    ModuleType Version    Name                                ExportedCommands                                             
    ---------- -------    ----                                ----------------                                             
    Manifest   0.3.4      AzureRM.NetCore.Preview                                                                          
    Manifest   0.3.4      AzureRM.Profile.NetCore.Preview     {Login-AzureRmAccount, Select-AzureRmSubscription}           
    Manifest   0.3.4      AzureRM.Resources.NetCore.Preview                                                                
    
    
        Directory: /usr/local/microsoft/powershell/6.0.0-beta.3/Modules
    
    
    ModuleType Version    Name                                ExportedCommands                                             
    ---------- -------    ----                                ----------------                                             
    Manifest   1.1.0.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}                           
    Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}                          
    Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...
    Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy,...
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}   
    Script     1.1.4.0    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
    Script     3.3.9      Pester                              {Describe, Context, It, Should...}                           
    Script     1.1.3.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...} 
    Script     0.0        PSDesiredStateConfiguration         {ThrowError, Get-PSMetaConfigDocumentInstVersionInfo, New-...
    Script     1.2        PSReadLine                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remov...
    

    Thank you in advance.

  2. added
    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif
    on Jun 25, 2017
  3. amhendley commented on Jun 26, 2017

    @amhendley

    I would like to report the exact same behaviour, but where it appears to occur for any call made.

    PS /> $PSVersionTable                                                                                                                       
    
    Name                           Value                                                                                                       
    ----                           -----                                                                                                       
    PSVersion                      6.0.0-beta                                                                                                  
    PSEdition                      Core                                                                                                        
    GitCommitId                    v6.0.0-beta.3                                                                                               
    OS                             Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X...
    Platform                       Unix                                                                                                        
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                     
    PSRemotingProtocolVersion      2.3                                                                                                         
    SerializationVersion           1.1.0.1                                                                                                     
    WSManStackVersion              3.0 
    

    Examples

    PS /> Install-Package PSScriptAnalyzer                                                                                                      
    Unable to find the specified file.
    At line:1 char:1
    + Install-Package PSScriptAnalyzer
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [], FileNotFoundException
        + FullyQualifiedErrorId : System.IO.FileNotFoundException
     
    PS /> Get-Command -verb Install                                                                                                             
    
    CommandType     Name                                               Version    Source                                                       
    -----------     ----                                               -------    ------                                                       
    Function        Install-Module                                     1.1.3.1    PowerShellGet                                                
    Function        Install-Script                                     1.1.3.1    PowerShellGet                                                
    Cmdlet          Install-Package                                    1.1.4.0    PackageManagement                                            
    Cmdlet          Install-PackageProvider                            1.1.4.0    PackageManagement     
    
    PS /> Get-ChildItem -Path /                                                                                                                 
    Unable to find the specified file.
    At line:1 char:1
    + Get-ChildItem -Path /
    + ~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [], FileNotFoundException
        + FullyQualifiedErrorId : System.IO.FileNotFoundException
    
    PS /> Get-Command Get-ChildItem                                                                                                             
    Get-Command : Unable to find the specified file.
    At line:1 char:1
    + Get-Command Get-ChildItem
    + ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-Command], FileNotFoundException
        + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
    
    
  4. MaximoTrinidad commented on Jun 26, 2017

    @MaximoTrinidad

    Hum!! I don't think the 'PSScriptAnalyzer' can be installed in PowerShell Core Linux and is not part of AzureRM module.

    You can use the following command to identify what's been tag for Linux:

    Find-Module -tag Linux
    

    For sure there's a lot of work to be done in the PSGallery to properly identify the difference between Windows PowerShell vs PowerShell Core as they are not the same.

    Hope this will clear some confusion,
    :)

    psgallerylinux_2017-06-26_7-05-51

  5. amhendley commented on Jun 27, 2017

    @amhendley

    I don't believe it is just PSScriptAnalyzer not being able to run on OSX. I ran the command you suggested Find-Module with the same result.

    PowerShell v6.0.0-beta.3
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    PS /> Find-Module -tag Linux                                                                                                                
    Unable to find the specified file.
    At line:1 char:1
    + Find-Module -tag Linux
    + ~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [], FileNotFoundException
        + FullyQualifiedErrorId : System.IO.FileNotFoundException
    
  6. amhendley commented on Jun 27, 2017

    @amhendley

    Well, this is interesting. I just tried for the hell of it to change back to my $HOME directory and it worked.

    PowerShell v6.0.0-beta.3
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    PS /Users/*******> Find-Module -tag Linux                                                                                                    
    
    Version    Name                                Repository           Description                                                            
    -------    ----                                ----------           -----------                                                            
    1.1.4.0    PackageManagement                   PSGallery            PackageManagement (a.k.a. OneGet) is a new way to discover and insta...
    1.1.3.1    PowerShellGet                       PSGallery            PowerShell module with commands for discovering, installing, updatin...
    0.3.4      AzureRM.Profile.NetCore.Preview     PSGallery            [PowerShell Core Edition] Microsoft Azure PowerShell - Profile crede...
    1.1.0.0    Microsoft.PowerShell.Archive        PSGallery            PowerShell module for working with ZIP archives.                       
    0.3.4      AzureRM.Resources.NetCore.Preview   PSGallery            [PowerShell Core Edition] Microsoft Azure PowerShell - Azure Resourc...
    0.3.4      AzureRM.NetCore.Preview             PSGallery            [PowerShell Core Edition] Azure Resource Manager Module - Management...
    1.0.0      SSH                                 PSGallery            Provides a PowerShell-based SSH client based on SSH.net  http://sshn...
    1.7.3.9    PoshRSJob                           PSGallery            Module designed to use PowerShell runspaces to create jobs that allo...
    2.0.4      Posh-SYSLOG                         PSGallery            Send SYSLOG messages from PowerShell                                   
    1.1.6.0    Microsoft.PowerShell.ODataUtils     PSGallery            Generates CDXML modules that contain cmdlets to manage OData and Red...
    0.1.1      PSPuTTY                             PSGallery            This PowerShell module enables you to switch between color themes fo...
    0.5.1.0    PSReleaseTools                      PSGallery            A set of commands for working with PowerShell 6.0 releases             
    

    Previously, I was running out of the root folder / (I have just noticed). So is there something going on under the hood of PS and using relative paths or something else from where you currently are.

  7. amhendley commented on Jun 27, 2017

    @amhendley

    OK. I think I have found the possible cause.

    1. I was working in a particular folder in a bash session.
    2. Done some stuff, then deleted the same working folder via OSX Finder.
    3. Updated PowerShell to v6 beta 3 on my Mac OSX.
    4. Then back in the bash session without changing the working directory, started powershell.
    5. Not realising that the PS prompt PS /> indicated that I was supposedly working in /.
    6. Executing the command $PSVersionTable obviously works as it not having to load up a script, cmdlet or module.
    7. Executing a call against a function where it wants to load a script, cmdlet or module is where the problem lies.

    I have been able to replicate this by repeating the process in session 1 changing to a folder like /tmp/test, then in another session (2) removing the /tmp/test, then back to the first session and run PS. Run a command calling a function and bingo - same result.

    Unix (and I assume for now Linux as well) do not lock a folder if another session is currently pointing to it or have a file open like Windows does. Hence the dramas.

    Anyway, I personally don't see this as a major bug, but the error message is not accurate as to the actual cause, but how or what is the best message to return, and how would PS determine the situation before running the executing command.

  8. MaximoTrinidad commented on Jun 27, 2017

    @MaximoTrinidad

    Ah!! A M Hendley (@amhendley)

    Too bad I don't have a Mac! :(

    It works on Ubuntu 16.04,2.

  9. vszalma commented on Jun 27, 2017

    @vszalma

    Hello. I am also seeing the same issue. I don't appear to be in the same situation as A M Hendley (@amhendley) .

    PS /Users/******> get-module -listavailable azurerm.*                          
    
    
        Directory: /usr/local/microsoft/powershell/6.0.0-beta.3/Modules
    
    
    ModuleType Version    Name                                ExportedCommands     
    ---------- -------    ----                                ----------------     
    Manifest   0.3.4      AzureRM.NetCore.Preview                                  
    Manifest   0.3.4      AzureRM.Profile.NetCore.Preview     {Login-AzureRmAcco...
    Manifest   0.3.4      AzureRM.Resources.NetCore.Preview                        
    
    
    

    Getting the same error on the import.

    PS /Users/*****> get-module -listavailable azurerm.* | import-module          
    Import-Module : Could not load file or assembly 
    'Microsoft.Azure.Commands.ResourceManager.Common, Version=1.6.0.0, 
    Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the 
    file specified.
    At line:1 char:1
    + get-module -listavailable azurerm.* | import-module
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundE 
       xception
        + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerS 
       hell.Commands.ImportModuleCommand
    
    
    PS /Users/*****> $psversiontable                                              
    
    Name                           Value                                           
    ----                           -----                                           
    PSVersion                      6.0.0-beta                                      
    PSEdition                      Core                                            
    GitCommitId                    v6.0.0-beta.3                                   
    OS                             Darwin 16.6.0 Darwin Kernel Version 16.6.0: F...
    Platform                       Unix                                            
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
    PSRemotingProtocolVersion      2.3                                             
    SerializationVersion           1.1.0.1                                         
    WSManStackVersion              3.0                                             
    
    
  10. SteveL-MSFT commented on Jun 27, 2017

    @SteveL-MSFT
    Member

    I would hold off on trying to use the Azure.NetCore.Preview module on Mac/Linux. They have a new release coming, but it's blocked by a CoreFx bug and waiting on us to pick up a new dotnet core that has the fix. Hopefully the stars align and everything works out in time for beta.4

  11. januschr commented on Jun 27, 2017

    @januschr

    Hi Steve Lee (@SteveL-MSFT),

    That sounds promising. Any word on what the timeline is for the new release?

    Thanks!

  12. MaximoTrinidad commented on Jun 27, 2017

    @MaximoTrinidad

    I thought this was already been addressed back in the Alpha version: #3577

    :)

  13. SteveL-MSFT commented on Jun 27, 2017

    @SteveL-MSFT
    Member

    januschr we're working with Azure PowerShell team closely, but the underlying issue is in dotnet. beta.4 is targeted for 7/13. I

  14. MaximoTrinidad commented on Jun 27, 2017

    @MaximoTrinidad

    Steve Lee (@SteveL-MSFT) Awesome!!
    That's just around the corner!
    :)

  15. 4c74356b41 commented on Jul 12, 2017

    @4c74356b41

    so it's tomorrow, any updates? thanks!

  16. 17 remaining items

  17. januschr commented on Jul 29, 2017

    @januschr

    Yes, sure, is it the login process you are uncertain about?
    You just enter Login-AzureRmAccount on the Powershell prompt, it will then tell to go to https://aka.ms/devicelogin in a browser and enter the code Login-AzureRmAccount shows you.

    When you enter the code, you will be prompted to enter login and password to Azure. This will create a session in Powershell, giving you back the prompt.

    Hope this helps,
    Janus

  18. tlisiecki commented on Jul 29, 2017

    @tlisiecki

    Just installed AzureRM.Netcore/0.9.1 on beta4 on linux and it works flawlessly.
    The login procedure works just as januschr described

  19. LaurentPrat commented on Jul 29, 2017

    @LaurentPrat

    Tomasz Lisiecki (@tlisiecki) & januschr Thank you so much for your support.

    The issue I have (on Mac) after successfully importing AzureRM (Import-Module AzureRM), is that when running the command : PS > Login-AzureRmAccount

    I got an error, see #4389

    Best regards,
    L.

  20. tlisiecki commented on Jul 29, 2017

    @tlisiecki

    Laurent Prat (@LaurentPrat) are you sure you installed AzureRM.netcore and not AzureRM. Both of them are on powershellgallery but to run on linux or mac AzureRM.netcore is required.

    Steve posted the command to do exactly that:
    install-module azurerm.netcore -scope currentuser

    Also - can you post the output of:
    Get-Module -ListAvailable |Where-Object {$_.Name -like 'AzureRM*'}

  21. LaurentPrat commented on Jul 29, 2017

    @LaurentPrat

    Tomasz Lisiecki (@tlisiecki) . Actually I had installed AzureRM long time back and was stuck waiting for the fix
    I did applied as specified by Steve. Still after that I ran into the issue explained, that Login command does not load.

    Please see below the output request - Many thanks in advance

    PS /Users/laurentprat> Get-Module -ListAvailable |Where-Object {$_.Name -like 'AzureRM*'}

    Directory: /Users/laurentprat/.local/share/powershell/Modules
    

    ModuleType Version Name ExportedCommands


    Manifest 0.9.1 AzureRM.Compute.Netcore {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet, New-AzureRmAvailabilitySet, Update-Azu...
    Manifest 0.9.1 AzureRM.Netcore
    Manifest 0.9.1 AzureRM.Network.Netcore {Add-AzureRmApplicationGatewayAuthenticationCertificate, Get-AzureRmApplicationGatewayAuthenticati...
    Manifest 0.9.1 AzureRM.Profile.Netcore {Disable-AzureRmDataCollection, Enable-AzureRmDataCollection, Remove-AzureRmEnvironment, Get-Azure...
    Manifest 0.9.1 AzureRM.Resources.Netcore {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignment, Get-AzureRmRoleAssignment, New-AzureR...
    Manifest 0.9.1 AzureRM.Storage.Netcore {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, New-AzureRmStorageAccount, New-AzureRmSt...
    Manifest 0.9.1 AzureRM.Tags.Netcore {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
    Manifest 0.9.1 AzureRM.Websites.Netcore {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New-AzureRmAppServicePlan, Remove-AzureRmAp...

    Directory: /usr/local/microsoft/powershell/6.0.0-beta.4/Modules
    

    ModuleType Version Name ExportedCommands


    Script 4.2.1 AzureRM {Remove-AzureRmSiteRecoveryServicesProvider, Get-AzureRmVMImageSku, Set-AzureRmVirtualNetworkGatew...
    Script 0.4.2 AzureRM.AnalysisServices {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnalysisServicesServer, Get-AzureRmAnalysisS...
    Script 4.2.1 AzureRM.ApiManagement {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementSsoToken, New-AzureRmApiManagementHostnam...
    Script 3.2.1 AzureRM.Automation {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutomationJobOutputRecord, Import-AzureRmAutom...
    Script 3.2.1 AzureRM.Backup {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerReregistration, Get-AzureRmBackupContainer...
    Script 3.2.1 AzureRM.Batch {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-AzureRmBatchAccountKeys, New-AzureRmBatc...
    Script 0.13.2 AzureRM.Billing {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod}
    Script 3.2.1 AzureRM.Cdn {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-AzureRmCdnProfile, Remove-AzureRmCdnProfi...
    Script 0.8.2 AzureRM.CognitiveServices {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitiveServicesAccountKey, Get-AzureRmCognitive...
    Script 3.2.1 AzureRM.Compute {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet, New-AzureRmAvailabilitySet, Update-Azu...
    Script 0.2.2 AzureRM.Consumption Get-AzureRmConsumptionUsageDetail
    Script 0.2.2 AzureRM.ContainerRegistry {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistry, Update-AzureRmContainerRegistry, Remo...
    Script 3.2.1 AzureRM.DataFactories {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get-AzureRmDataFactorySlice, Save-AzureRmDa...
    Script 3.2.1 AzureRM.DataLakeAnalytics {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLakeAnalyticsCatalogCredential, Remove-Azu...
    Script 4.2.1 AzureRM.DataLakeStore {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRmDataLakeStoreTrustedIdProvider, Remove-A...
    Script 3.2.1 AzureRM.DevTestLabs {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShutdownPolicy, Get-AzureRmDtlAutoStartPoli...
    Script 3.2.1 AzureRM.Dns {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remove-AzureRmDnsRecordSet, Set-AzureRmDnsRe...
    Script 0.4.2 AzureRM.EventHub {New-AzureRmEventHubKey, Get-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespaceAuthorizationRu...
    Script 3.2.1 AzureRM.HDInsight {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefinition, Wait-AzureRmHDInsightJob, New-Az...
    Script 3.2.1 AzureRM.Insights {Get-AzureRmUsage, Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-AzureRmLogProfile...}
    Script 2.2.1 AzureRM.IotHub {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGroup, Get-AzureRmIotHubConnectionString, ...
    Script 3.2.1 AzureRM.KeyVault {Add-AzureKeyVaultCertificate, Set-AzureKeyVaultCertificateAttribute, Stop-AzureKeyVaultCertificat...
    Script 3.2.1 AzureRM.LogicApp {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegrationAccountCallbackUrl, Get-AzureRmInte...
    Script 0.15.2 AzureRM.MachineLearning {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitmentP...
    Script 0.7.2 AzureRM.Media {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServiceKey, Get-AzureRmMediaServiceKeys, Get...
    Script 4.2.1 AzureRM.Network {Add-AzureRmApplicationGatewayAuthenticationCertificate, Get-AzureRmApplicationGatewayAuthenticati...
    Script 3.2.1 AzureRM.NotificationHubs {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAuthorizationRules, Get-AzureRmNotification...
    Script 3.2.1 AzureRM.OperationalInsights {New-AzureRmOperationalInsightsAzureActivityLogDataSource, New-AzureRmOperationalInsightsCustomLog...
    Script 3.2.1 AzureRM.PowerBIEmbedded {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPower...
    Script 3.2.1 AzureRM.profile {Disable-AzureRmDataCollection, Enable-AzureRmDataCollection, Remove-AzureRmEnvironment, Get-Azure...
    Script 3.2.1 AzureRM.RecoveryServices {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRecoveryServicesVault, Get-AzureRmRecoveryS...
    Script 3.2.1 AzureRM.RecoveryServices.Backup {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmRecoveryServicesBackupManagementServer, Get-...
    Script 3.2.1 AzureRM.RedisCache {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCacheScheduleEntry, Get-AzureRmRedisCacheP...
    Script 0.2.2 AzureRM.Relay {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set-AzureRmRelayNamespace, Remove-AzureRmRe...
    Script 4.2.1 AzureRM.Resources {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignment, Get-AzureRmRoleAssignment, New-AzureR...
    Script 0.15.2 AzureRM.Scheduler {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSchedulerJobCollection, Get-AzureRmScheduler...
    Script 3.2.1 AzureRM.ServerManagement {Invoke-AzureRmServerManagementPowerShellCommand, Get-AzureRmServerManagementSession, New-AzureRmS...
    Script 0.4.2 AzureRM.ServiceBus {Get-AzureRmServiceBusTopic, Get-AzureRmServiceBusTopicAuthorizationRule, Get-AzureRmServiceBusTop...
    Script 0.2.2 AzureRM.ServiceFabric {Add-AzureRmServiceFabricApplicationCertificate, Add-AzureRmServiceFabricClientCertificate, Add-Az...
    Script 4.2.1 AzureRM.SiteRecovery {Get-AzureRmSiteRecoveryFabric, New-AzureRmSiteRecoveryFabric, Remove-AzureRmSiteRecoveryFabric, S...
    Script 3.2.1 AzureRM.Sql {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-AzureRmSqlDatabaseTransparentDataEncryptionA...
    Script 3.2.1 AzureRM.Storage {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, New-AzureRmStorageAccount, New-AzureRmSt...
    Script 3.2.1 AzureRM.StreamAnalytics {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnalyticsDefaultFunctionDefinition, New-Azur...
    Script 3.2.1 AzureRM.Tags {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
    Script 3.2.1 AzureRM.TrafficManager {Disable-AzureRmTrafficManagerEndpoint, Enable-AzureRmTrafficManagerEndpoint, Set-AzureRmTrafficMa...
    Script 3.2.1 AzureRM.UsageAggregates Get-UsageAggregates
    Script 3.2.1 AzureRM.Websites {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New-AzureRmAppServicePlan, Remove-AzureRmAp...

  22. 4c74356b41 commented on Jul 29, 2017

    @4c74356b41

    Laurent Prat (@LaurentPrat) so how did you port full net framework (to use AzureRM) to macos?

  23. LaurentPrat commented on Jul 29, 2017

    @LaurentPrat

    Gleb Boushev (@4c74356b41) Not sure I am following your mind - fyi, I have just installed the cross platform PowerShell package - the last is BETA4 for MacOs check the download page (powershell-6.0.0-beta.4-osx.10.12-x64.pkg).

  24. tlisiecki commented on Jul 29, 2017

    @tlisiecki

    Laurent Prat (@LaurentPrat) well I guess there is some clash on command names from different modules and the proper modules do not auto load.
    I bielieve you could try
    Import-Module AzureRM.Netcore and then try to log in.

    But if I were you I`d first uninstall AzureRM module completely. AzureRM is a module running on Full .NET framework as 4c74356b41 suggests between lines :) and there is no way it would ever run on linux/mac.

    On mac you have powershell core, based on .NET core framework and thus you need AzureRM.netcore module.
    Hope that is clear enough.

  25. janegilring commented on Jul 29, 2017

    @janegilring

    Is PSCredential objects supposed to work in the current version of Add-AzureRmAccount?

    I get this error:

    PS C:\Program Files\PowerShell\6.0.0-beta.4> $cred = Get-Credential

    Windows PowerShell credential request
    Enter your credentials.
    User: [email protected]
    Password for user [email protected]: **********

    PS C:\Program Files\PowerShell\6.0.0-beta.4> Add-AzureRmAccount -Credential $cred
    Add-AzureRmAccount : accessing_ws_metadata_exchange_failed: Accessing WS metadata exchange failed: Response status cod
    e does not indicate success: 406 (NotAcceptable).
    At line:1 char:1

    • Add-AzureRmAccount -Credential $cred
    •   + CategoryInfo          : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
      
      

    PS C:\Program Files\PowerShell\6.0.0-beta.4>

  26. LaurentPrat commented on Jul 29, 2017

    @LaurentPrat

    Tomasz Lisiecki (@tlisiecki)

    uninstalling/reinstalling, then checked the AzureRM* modules - where I saw there are only the AzureRM.netcore (Manifest 0.91) ...

    And it fixed it. As of now, can login, and execute powershell command successfully ;)

    btw, I have closed the #4389

    Thank you so much

  27. tlisiecki commented on Jul 29, 2017

    @tlisiecki

    Laurent Prat (@LaurentPrat) You`re most welcome :)

    Jan Egil Ring (@janegilring) id doesn`t work for me either, but I get some different Exception

    
    PS /home/liske> $cred = Get-Credential                                                                                                                                                                                                                                                                                                                                                                    Windows PowerShell credential request                                                                                                                                                                Enter your credentials.                                                                                                                                                                              User: XXXX                                                                                                                                                              
    Password for user XXXX: *************
    
    PS /home/liske> Add-AzureRmAccount -Credential $cred                                                                                                                                                 
    Add-AzureRmAccount : password_required_for_managed_user: Password is required for managed user
    At line:1 char:1
    + Add-AzureRmAccount -Credential $cred
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
     
    PS /home/liske>
    
  28. janegilring commented on Jul 29, 2017

    @janegilring

    Tomasz Lisiecki (@tlisiecki) Thanks for confirming. Forgot to mention that I ran PS Core on Windows 10, which is likely why we got slightly different error messages (you seem to be running a different OS).

    FYI: I`ve submitted an issue in the Azure PowerShell repository

  29. LarrysGIT commented on Aug 8, 2017

    @LarrysGIT

    Tried hundred of times finally made 1 step, after installed azurerm.netcore module, just import modules end with "netcore".
    Get-Module -ListAvailable azurerm*netcore | Import-Module
    PSVersion

    > Name                           Value                                                                                                                                                        
    > ----                           -----                                                                                                                                                        
    > PSVersion                      6.0.0-beta                                                                                                                                                   
    > PSEdition                      Core                                                                                                                                                         
    > GitCommitId                    v6.0.0-beta.5                                                                                                                                                
    > OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/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
    
  30. 4c74356b41 commented on Aug 14, 2017

    @4c74356b41

    Steve Lee (@SteveL-MSFT) hey there, do you know why each time i run azure powershell it prompts for datacollection? it honestly looks like a bug. the '/home/user/.config/Windows Azure Powershell/AzureDataCollectionProfile.json' file is there and contains: {"enableAzureDataCollection":true}, yet each time i open new session and run azure cmdlets it prompts if i want to collect data

  31. SteveL-MSFT commented on Aug 14, 2017

    @SteveL-MSFT
    Member

    Gleb Boushev (@4c74356b41) don't know, best to open an issue in their repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions