PowerShell

The PowerShell forum accepts bug reports as well as feedback and suggestions. For more information, check out the PowerShell Homepage

The following is a list of the states we use to track items.

status meaning
survey We saw this and we are considering it. Please upvote if it’s important to you.
needs more information We don’t understand the issue and need additional details.
investigating We are looking at this internally to understand things like: scenario, reproduction of issue, costing, or other technical details.
in queue The issue is understood and in our unprioritized backlog. Your votes will be used to drive prioritization of this work.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. PS has to be restarted to run a script that was unblocked during the same session

    If your execution policy is RemoteSigned and you try to execute a downloaded, unsigned script, PowerShell reports an error (as it should.) However, if you then run Unblock-File on that same script and try to run it again, you continue to get the error until you restart PowerShell.

    I did some digging, and it turns out that the method PowerShell uses to determine the security zone for a file (IInternetSecurityManager.MapUrlToZone) uses caching, by default. This method has a flag called MUTZDONTUSE_CACHE, which I have confirmed does fix the problem, but will require a code update from the PowerShell…

    17 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  2. Provide Simple Instructions on Publishing to the PowerShell Gallery

    Hi!

    Problem:
    There aren't any official, friendly resources on publishing PowerShell modules. (e.g. https://twitter.com/Josh_Atwell/status/707940487517196288)

    Why does it matter:
    We have less than 1,000 modules in the gallery. Sure, you started late, but this is an order of magnitude fewer than repositories like RubyGems, PyPI, CPAN, and more. Regardless of accuracy, would be nice if PowerShell was anywhere close to others on this chart: http://www.modulecounts.com/

    Libraries (modules here) are key to the growth and use of a language. The more libraries available, the more useful PowerShell will be across use cases (beyond admin...), the more folks will get involved, and…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →

    Marking this completed, but willing to change that if you disagree…
    There are 2 topics in the PowerShell Gallery documentation that were written to address this:
    1> For the basic mechanics, see Creating and Publishing an item (https://docs.microsoft.com/en-us/powershell/gallery/psgallery/creating-and-publishing-an-item)
    2> For best practices, see the Publishing Guidelines topic (https://docs.microsoft.com/en-us/powershell/gallery/psgallery/psgallery-PublishingGuidelines)

    If those do not address the ask, please let us know, either here, or in an issue in our PowerShell documentation repo at github.com/powershell/powershell-docs.

  3. Duplicate PSModulePath Entries Cause Module Resolution Errors

    Some overly helpful installer added 'C:\Program Files\WindowsPowerShell\Modules' to my system PSModulePath environment variable. This had the effect of duplicating from within PowerShell, so it looked like this when I typed $env:PSModulePath (split for clarity):

    • C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\;
    • C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\;
    • C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\Storage\
    • C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\;
    • C:\Program Files\Microsoft Message Analyzer\PowerShell\;
    - C:\Program Files\WindowsPowerShell\Modules;
    - C:\Program Files\WindowsPowerShell\Modules\;
    • C:\Users\tomta\Documents\WindowsPowerShell\Modules;
    • C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;

    The effect was to cause Get-Module to see the same module twice, even though it was installed once.
    It also caused Import-Module and Publish-AzureVMDscConfiguration to fail due to inability to…

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  4. Add an option to view the files in RAW mode

    Currently we can view the files in html mode, perhaps functionality could be added to support view in raw mode comparable GitHub.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    completed  ·  0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
  5. Add a FullName alias to file types to improve pipeline compatibility

    It would be great to run code as:

    mkdir foo | cd
    mkdir foo | pushd

    However this doesn't work due to name mismatch of the path property.

    My workaround:
    Update-TypeData -MemberName Path -TypeName IO.DirectoryInfo -MemberType AliasProperty -Force -Value FullName
    Update-TypeData -MemberName Path -TypeName IO.FileSystemInfo -MemberType AliasProperty -Force -Value FullName

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  6. Install-PackageProvider chocolatey

    I have installed firts nuget with the command Install-PackageProvider –Name nuget -RequiredVersion 2.8.5.204 -Scope AllUsers. Then, I have restarted Powersehell as described in Powershell API.

    Afte that I install chocolatey provider with Install-PackageProvider –Name chocolatey -RequiredVersion 2.8.5.130 -Scope AllUsers, This makes chocolatey available as provider but it doesn't really install the chocolate provider. To get to install chocolatey provider, after that you have to do get-packageprovider -name chocolatey.
    If it is not a bug, it is very confusing.

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    completed  ·  1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  7. Error while save/install Azure.Storage module

    Error while save/install Azure.Storage module, tried it couple of times, so i am sure it is not internet problem.

    PS> Install-Module Azure.Storage
    WARNING: Package 'Azure.Storage' failed to download ....

    also tried for specific version, but same error.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →

    This post had no additional feedback, however there were issues with the Azure modules that were addressed by the Azure team, and that look to be similar.
    Lacking additional information, we are marking this item complete.

  8. PowerShell Jobs / Error Handling

    While I was creating a script for running SQL scripts, I needed a way
    to control the chaos that was a script running scripts.

    To do this, I used jobs in PowerShell.

    For the purpose of this post, $job is the current element for $jobs = Get-Job

    While I was attempting to gather the output of the error messages, I noticed the following behavior:

    The job state would sometimes be completed, but with an error message stored in $job.ChildJobs[0].Error.

    The job state would sometimes be failed, and have an error in $job.ChildJobs[0].Error.

    Sometimes the JobStateInfo property would have the failure…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  9. connect network drive with credentials

    Hi there

    it isn't possible to connect to an password-protected network drive via powershell only.

    The easiest solution is to use the old "net use" command because there its possible to add credentials.

    Powershell should be able to connect to network drives without old commands and huge workarounds.

    And before all are screaming about security - no one knows my environment and don´t know about the level of security I need.
    Also when I´m using (have to use) the net use command the security stops when someone else can read the script.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  10. Powershell in Visual Studio?

    Why isn't Powershell natively supported in Visual Studio?

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    completed  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  11. Uninstall-Package -Version is Evil!!

    It is evil because the Version parameter is an alias for - wait for it - MinimumVersion! So if you have Foo v1.0 and Foo v2.0 installed on your machine and you want to uninstall v1.0 - you know because you now have 2.0 and no longer need v1.0 - you say hey PowerShell "Uninstall-Package -Name Foo -Version 1.0". And PowerShell will proceed to uninstall v2.0!! Because it is following MinimumVersion semantics i.e. the highest version number >= the specified "minimum version". But you didn't specify "-MinimumVersion", you specified "-Version".

    A suggested fix is to change Version to be an…

    18 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →

    This work was completed and is available in WIndows 10 anniversary updated, Server 2016 RTM and GA builds, and WMF 5.1.

  12. Bug: Can't clear command buffer (it persists after PS restart)

    If a bit of sensitive info got onto the command buffer, clearing it via Alt+F7 doesn't work. All I have to do to view the command buffer again is restart PowerShell. Can't find any way to clear the command buffer.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  13. about_Escape_Characters doesn't mention syntax requirements

    Please mention that, when using a backtick as a continuation character, there must be no trailing space (or it escapes the space) and there must be a preceding space or the preceding token must be enclosed.

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  14. Get-Help cmdlet fails to show about topics when invalid module is installed

    When a malformed module is present on a computer, the Get-Help cmdlet stops working when viewing about help topics.

    Steps to reproduce:
    1. Create a new module directory in one of PowerShell's module path named "fubar".
    2. Create an empty "fubar.psd1" file in that module directory.
    3. Run help about_functions_advanced_parameters. Note the error [1].

    I would expect PowerShell to fail a little more gracefully. Than a NullReferenceException.

    [1]
    > help aboutfunctionsadvanced_parameters
    Get-Help : Object reference not set to an instance of an object.
    At line:55 char:7
    + Get-Help @PSBoundParameters | more
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified:
    10 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  15. Bug: WMF5 Pull Server has limited functionality in core

    While the pull server can be installed on server core, the new WMF5 ConfigurationNames feature will not function properly unless it is installed on a full installation of windows server.

    3 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  16. Installing modules from an internal Nuget based gallery fails in WMF5 RTM

    After installing WMF5 RTM on down-level systems, or upgrading to Windows 10 1151, modules published to an internal Nuget based gallery fail to install, update, or save.

    Steps to reproduce:

    find-module -Repository mitrenuget -name xSmbShare | install-module
    WARNING: Could not get response from query
    'https://nexussrv1.mitre.org/service/local/nuget/nuget-releases/package/xSmbShare/1.1.0.0'.
    WARNING: MSG:SourceLocationNotValid «https://nexussrv1.mitre.org/service/local/nuget/nuget-releases/»
    PackageManagement\Install-Package : Package 'xSmbShare' failed to install.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1470 char:34
    + ... $null = PackageManagement\Install-Package @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ResourceUnavailable: (C:\Users\rdean\...xSmbShare.nupkg:String) [Install-Package], Excep
    

    tion

    + FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPac
    

    kage

    Debugging this further with Fiddler produces the following response:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head> …

    8 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    19 comments  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →

    Thankyou for helping us understand the issue. Server TP5 has the fix included, as will future releases of WMF and Package Management.

  17. Add Support for Flags Attribute with Enum Creation

    Having the ability to create an Enum is great, but it would be made better if support for the Flags Attribute attribute like you can do with creating a C# Enum to allow it to treat supplied values as bit fields to potentially display more values in an Enum based on the value provided.

    A C# example would be like this:

    Add-Type -TypeDefinition @"
    [System.Flags]
    public enum Animals
    {

    Dog = 1,
    
    Cat = 2,
    Bird = 3,
    Lizard = 10

    }
    "@

    I could then do the following...

    [Animals]11

    ...and get back Dog, Lizard

    Where with PowerShell creating the…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →

    As mentioned by Jason in the comments below, this is already supported by adding the [Flags()] attribute to enum definition

  18. WMF 5.0 RTM Should Be Available On Client Operating Systems

    The WMF 5.0 RTM is only available for Server operating systems at present. Please make the same build available for client OSes as well. consistency is key in any management endeavor, and having to consider one more unnecessary complexity when composing scripts is a problem.

    43 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    7 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  19. Warning states wrongly that old module version will be deleted

    Warning states wrongly that old module version will be deleted when you use Install-Module <modulename> -Force

    PS C:&gt; install-module azurerm -Verbose
    ...
    ...
    WARNING: Version '1.1.0' of module 'AzureRM' is already installed at 'C:\Program
    Files\WindowsPowerShell\Modules\AzureRM\1.1.0'. To delete version '1.1.0' and install version '1.2.2', run
    Install-Module, and add the -Force parameter.

    PS C:\WINDOWS\system32> install-module azurerm -Force

    PS C:\WINDOWS\system32> dir 'C:\Program Files\WindowsPowerShell\Modules\AzureRM'

    Directory: C:\Program Files\WindowsPowerShell\Modules\AzureRM
    

    Mode LastWriteTime Length Name


    d----- 1/16/2016 12:29 AM 1.1.0
    d----- 3/4/2016 12:45 PM 1.2.2

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →

    This issue is currently not repro in more recent builds, for us and for Aleksandar.
    We are assuming the issue has been fixed. If anyone else encounters the problem, please let us know.

  20. I can't get the 'about comment based help' item to appear under get-help

    BTW, where do you post problems (I wouldn't know if it was an actual bug, maybe I haven't loaded something). I did do the update-help. When I try to do tab completion it is stuck on the first about: aboutWS-ManagementCmdlets

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Zachary Alexander responded

    This should be fixed, there was an underlying issue with the about_ topics.
    Open PS as administrator and run update-help -force . if that does not resolve the issue, please let me know and i’ll revert the “closed” status.

  • Don't see your idea?

Feedback and Knowledge Base