Git Product home page Git Product logo

azure-powershell-common's Introduction

Microsoft Azure PowerShell Common

This repository contains common code used for Azure PowerShell cmdlets. This repository does not contain any cmdlets.

The primary repository for Azure PowerShell can be found here.

Reporting Issues and Feedback

Issues

If you find any bugs when using the Azure PowerShell modules, please file an issue here, making sure to fill out the provided template with the appropriate information.

Alternatively, be sure to check out the Azure Support Community if you have trouble with any of the cmdlets or Azure services.

Feedback

If there is a feature you would like to see in Azure PowerShell, please use the Send-Feedback cmdlet, or file an issue here, to send the team direct feedback.

Contribute Code

If you would like to become an active contributor to Azure PowerShell please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.

If you want to contribute to the cmdlet code, you can find the Azure PowerShell repository here.

Learn More


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-powershell-common's People

Contributors

adittulasi avatar avirupch avatar azdevxps avatar blueww avatar brnleehng avatar cormacpayne avatar darshanhs90 avatar deepakswifty avatar dihan0604 avatar emmazhu avatar eshaparmar avatar gucalder avatar huangpf avatar hyonholee avatar jaredmoo avatar markcowl avatar miyanni avatar mkherani avatar neharaje avatar ogail avatar pikumarmsft16 avatar pragrawa avatar praries880 avatar safeermohammed avatar sergey-shandar avatar sriramvu avatar stankovski avatar vivsriaus avatar yaakoviyun avatar yoavrubin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-powershell-common's Issues

Normalize-Location doesn't return any value

Normalize-Location in ScenarioTest's Common code doesn't return modified location value back.

I've found only one place where this location is used and it doesn't throw an error because in both cases it returns null

Assert-AreEqual (Normalize-Location $vaultLocation) (Normalize-Location $v.Location)

Also I think Normalize-Location could be used in Get-Location. When Get-Location filters locations for resource type it compares strings directly

$location = $resourceTypes.Locations | Where-Object { $_ -eq $preferredLocation }

If $preferredLocation is like westus the comparison would fail because resource type's locations are in human-readable format (West US). Normalizing both parts of comparison would help to avoid this issue.

Import-Module PowerShellGet error: Cannot find a variable with the name 'AmsiContext'

Can anyone help me with this issue?

When I execute this command:

Import-Module PowerShellGet

I got this error:

Import-Module : Cannot find a variable with the name 'AmsiContext'.
At line:1 char:1
+ Import-Module PowerShellGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (AmsiContext:String) [Import-Module], ItemNotFoundException
    + FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

The second time it goes fine:

image

AzureEnvironment.cs has reference to invalid domain name discover.azure.com

When going through the authentication flow with Azure there are several attempts to hit discover.azure.com.
The domain name is not documented anywhere and also always results in a name resolution failure.
This has been criticized by several enterprise security admins recently because they do not want to enable a URL that does not exist.
It is only used to handle an empty Metadata endpoint; we should change it to an endpoint that works or handle the nullOrEmpty case differently.

Command fails when multiple sessions executing at the same time

We have a test automation suite which runs multiple tests in parallel through Azure DevOps pipelines. These tests call Disable-AzContextAutosave when they start, and when multiple tests start at exactly the same time (in separate Powershell instances) we often get the following error:

Disable-AzContextAutosave : The given key was not present in the dictionary.
At C:\devops_agent_A\_work\_temp\azureclitaskscript1634703545536_inlinescript.ps1:6 char:3
+   Disable-AzContextAutosave -Scope Process | Out-Null
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Disable-AzContextAutosave], KeyNotFoundException
    + FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Azure.Commands.Profile.Context 
   .DisableAzureRmContextAutosave
 
The given key was not present in the dictionary.
   at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key)
   at Microsoft.Azure.PowerShell.Common.Share.Survey.SurveyHelper.ShouldModulePrompt(SurveyHelper helper, String moduleName, Int32 majorVersion)
   at Microsoft.Azure.PowerShell.Common.Share.Survey.SurveyHelper.ShouldFlush(String moduleName, Int32 majorVersion, Func`4 condition, Action`3 updateModule)
   at Microsoft.Azure.PowerShell.Common.Share.Survey.SurveyHelper.ShouldPropmtSurvey(String moduleName, Version moduleVersion)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.EndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()

We expected these calls to succeed, rather than throwing this exception. It appears that the relevant code lives in this repo but please redirect me if I'm in the wrong place!

Remove unused tools

image

I did a quick search and it seemed NuGet-4.7.0 and NupkgMerge are not used in our code. Their functionality may have been covered by ADO pipeline.

Todo:
Verify if the tools are needed. If not, remove them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.