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. [ValidateNotNullOrEmpty()] and Read-Host - something wierd.

    Votes from Connect: 19

    Original Date Submitted: 10/4/2010 10:57:53 PM

    Description:
    Contact Information
    Handle: Clint B
    Site Name: PowerShell
    Feedback ID: 610176


    Frequency: Always Happens
    Regression: I don't know if this issue existed previously

    Problem Description:
    Given the following function, and empty or null input into Read-Host (just hitting return) an error that one would expect to have generated is not. PSDebug says that Read-Host is setting a variable to be an empty string (SET $x = ''), but it doesn't seem to be caught by the validation. We have more details and what not in the technet forums and…

    4 votes
    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 →
  2. In absence of Process block in script block ForEach collection method invoke End block for each element

    (1..3).ForEach{Begin{'Begin'}Process{'Process'}End{'End'}}
    Begin
    Process
    Process
    Process
    End

    (1..3).ForEach{Begin{'Begin'}End{'End'}}
    Begin
    End
    End
    End

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

    We’ll send you updates on this idea

    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  3. BUG: WMF5: Nested errors are not properly surpressed when using ErrorAction

    If a child function throws an exception when called from a parent function and ErrorAction SilentlyContinue is specified, the error variable will still contain the inner exception.

    This is different behavior than previoys WMF versions.

    Test script posted here: https://gist.github.com/trondhindenes/a1d72085d9c727bd8910

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  4. Exclude parameter doesn't work on Get-ChildItem (ls alias) at root drive folder

    Votes from Connect: 3

    Original Date Submitted: 10/30/2015 7:31:59 PM

    Description:
    Contact Information
    Handle: Aurélien Lustrement
    Site Name: PowerShell
    Feedback ID: 1961824


    Frequency: PowerShell
    Regression: Open PS and change directory to "C:"
    Enter command "ls -Exclude Users".
    The command returns nothing

    Problem Description:
    Command "ls -Exclude Something" always returns nothing if executed at root drive folder. Perfectly works on any other subfolder.
    Tested on Win7 (PS 2.0 & 5.0) and Win10.

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1961824 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1961824).

    Repro Steps:
    Open PS and change directory to "C:"
    Enter command "ls…

    3 votes
    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 →
  5. Connecting to Office 365 crashes WMF5 PowerShell.exe

    Votes from Connect: 6

    Original Date Submitted: 9/1/2015 2:33:33 PM

    Description:

    Contact Information
    Handle: Michel de Rooij
    Site Name: PowerShell
    Feedback ID: 1738789


    Frequency: PowerShell
    Regression: Open PowerShell session in Windows 10 build 10532
    $SessionEOP = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.protection.outlook.com/powershell-liveid/ -Credential (Get-Credential) -Authentication Basic -AllowRedirection

    Import-PSSession -Session $SessionEOP
    <Crash>

    Problem Description:
    When connecting to certain Office 365 services, like EOP, the PowerShell.exe in WMF5 crashes (Windows 10 builds 10525 and 10532 show this behavior). When connecting to the /powershell-liveid URL, session gets redirected to /powershell-liveid?PSVersion=5.0.10525.0 (or 10532 for that build) then abends with a 'PowerShell has stopped working'.

    Product…

    3 votes
    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 →
  6. Read-Host problems in Powershell 5.0.10240.16384

    Votes from Connect: 3

    Original Date Submitted: 8/6/2015 11:52:12 PM

    Description:
    Contact Information
    Handle: Unit347
    Site Name: PowerShell
    Feedback ID: 1635172


    Frequency: PowerShell
    Regression:

    Problem Description:
    $NICs = Get-WmiObject Win32NetworkAdapter | Where-Object {$.PhysicalAdapter -eq $true}

    $NICs | Select-Object Name, DeviceID

    $NICnumber = Read-Host "`nSelect Network Adapter"

    When running the code above on PowerShell 4.0 it works normally, but when I try it on Powershell 5.0 the list of network cards is displayed after the Read-Host output. I also get the same result with "[Console]::ReadLine()".

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1635172…

    3 votes
    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 →
  7. Unexpected behavior with UNC paths

    Votes from Connect: 4

    Original Date Submitted: 7/17/2015 7:14:42 PM

    Description:
    Contact Information
    Handle: sba
    Site Name: PowerShell
    Feedback ID: 1556276


    Frequency: PowerShell
    Regression: 1. Set the current location to somewhere in the registry
    cd HKLM:/Software/Microsoft


    1. Copy a file from one "drive-specified path" to another one:
      Copy-Item -Destination h:\tmp -Path E:\tmp\foo.csv

    This works fine.


    1. Attempt to copy a file from one "drive-specified path" to a UNC path:
      Copy-Item -Destination //nas/users/sba/tmp -Path E:\tmp\foo.csv

    This fails:

    Copy-Item : Source and destination path did not resolve to the same provider.
    At line:1 char:1
    + Copy-Item -Destination //nas/users/sba/tmp -Path E:\tmp\foo.csv
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo
    4 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 →
  8. IIF Statement (If Shorthand)

    Votes from Connect: 4

    Original Date Submitted: 7/2/2015 7:46:53 PM

    Description:
    Contact Information
    Handle: TheRealMartin9700
    Site Name: PowerShell
    Feedback ID: 1497806


    Problem Description:
    It would be great if PowerShell could get IIF-like functionality:

    IIF -Condition (condition) -True (true value) -False (false value)

    IIF ($a -gt 5) "Its bigger!" "Too small"

    IIF ($a -lt 5) { $b = "Too small" } { $b = "bingo!" }

    There are plenty of times where we need to make a quick value check and either set a variable or set a variable and going through the full IF syntax is a pain.

    Product Studio…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  9. Import-Csv does not correctly detect encoding for UTF-8 files without BOM

    Votes from Connect: 6

    Original Date Submitted: 5/27/2015 3:02:36 AM

    Description:
    Contact Information
    Handle: electricmonk
    Site Name: PowerShell
    Feedback ID: 1371244


    Frequency: PowerShell
    Regression:

    Problem Description:
    Using Import-Csv on a UTF-8 file without a BOM will result in unrecognized extended characters

    Import-Csv -Encoding UTF8 does not work correctly either.

    Thanks to Joakim Svendsen for finding this:
    http://www.powershelladmin.com/wiki/Convertfrommostencodingstoutf8with_powershell

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1371244 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1371244).

    Repro Steps:
    Expected Results:

    Internal BugId: 14513

    4 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 →
  10. Get-AuthenticodeSignature should work with catalog-signed files.

    Votes from Connect: 5

    Original Date Submitted: 2/9/2015 6:05:29 PM

    Description:
    Contact Information
    Handle: Bryan Lockwood
    Site Name: PowerShell
    Feedback ID: 1121526


    Frequency: Always Happens
    Regression: Yes, this happens in previous released versions

    Problem Description:
    Get-AuthenticodeSignature works great for files with embedded Authenticode signatures. It should work just as well for those using signed catalog files (as defined on page 12 of "Code Signing Best Practices" at http://goo.gl/O3IbiE ). If signtool and sigcheck can do this, PowerShell should be able to!

    Thanks for considering this.

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1121526 (…

    4 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 →
  11. Script cmdlets with dynamic parameters and -PipelineVariable

    Votes from Connect: 3

    Original Date Submitted: 12/3/2014 7:09:24 PM

    Description:
    Contact Information
    Handle: PetSerAl
    Site Name: PowerShell
    Feedback ID: 1045513


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    Script cmdlets with dynamicparam block throw exception when used with -PipelineVariable common parameter.

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 1045513 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1045513).

    Repro Steps:
    &{[CmdletBinding()]param()dynamicparam{}} -PipelineVariable asd

    Expected Results:

    Internal BugId: 13129

    3 votes
    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 →
  12. Powershell 2 suppresses exception throw from .NET object property

    Votes from Connect: 3

    Original Date Submitted: 12/2/2014 10:16:19 PM

    Description:

    Contact Information
    Handle: Lexey
    Site Name: PowerShell
    Feedback ID: 1044801


    Frequency: Always Happens
    Regression: I do not know if this issue existed previously

    Problem Description:
    I am trying to get a value of a property implemented in .NET object. The get implementation throws an Exception. Script is being executed with $ErrorActionPreference = "Stop".
    However, the exception is just being ignored. That really breaks the whole idea of exception handling. :(
    BTW, $obj.get_Property() call produces an exception as expected. So, only the $obj.Property is impaired.

    Product Studio item created by…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  13. Still cannot merge to any output stream except stdout (1)

    Votes from Connect: 11

    Original Date Submitted: 4/16/2012 10:30:46 AM

    Description:
    Contact Information
    Handle: Joel -Jaykul- Bennett
    Site Name: PowerShell
    Feedback ID: 737038


    Frequency: Always Happens
    Regression: Yes, this happens in all previous versions

    Problem Description:
    We need to be able to get a single output file with more than one of the output streams in it

    With PowerShell 3 Beta, we can now redirect each of the output streams, but we still can't merge them except into the stdout stream. We should be able to redirect output into the other streams, if only because this does not work (It…

    4 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 →
  14. ConvertTo-JSON in PSv3 Beta does not support values containing double-quotes

    Votes from Connect: 22

    Original Date Submitted: 4/9/2012 12:35:27 PM

    Description:
    Contact Information
    Handle: J Stangroome
    Site Name: PowerShell
    Feedback ID: 735978


    Frequency: Always Happens
    Regression: I don't know if this issue existed previously

    Problem Description:
    Passing a hashtable with a string value containing a double-quote causes an error "The converted JSON string is in bad format."

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 735978 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=735978).

    Repro Steps:
    $ht = @{ name = "single quotes (') are fine"; value = 'double quotes (") are not' }
    $ht | ConvertTo-Json

    Expected Results:
    {

    4 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 →
  15. PowerShell 3 should have (l)user updateable help

    Votes from Connect: 15

    Original Date Submitted: 3/5/2012 11:07:50 AM

    Description:

    Contact Information
    Handle: Joel -Jaykul- Bennett
    Site Name: PowerShell
    Feedback ID: 728689


    Frequency: Always Happens
    Regression: No, this is new to the most recent version

    Problem Description:
    The current plan seems to be for PowerShell to ship with just SYNTAX help and require an administrator to use UPDATE-HELP before the inline help actually works.

    We need a way for non-administrators to get help on the box. I suggest you should default to downloading help to a shared location like C:\ProgramData\ that any user can update.

    Product Studio item created…

    4 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 →
  16. PowerShell.exe can hang if STDIN is redirected

    Votes from Connect: 26

    Original Date Submitted: 7/2/2010 7:56:48 AM

    Description:

    Contact Information
    Handle: Jason Stangroome
    Site Name: PowerShell
    Feedback ID: 572313


    Frequency: Sometimes Happens
    Regression: I don't know if this issue existed previously

    Problem Description:
    The Microsoft.PowerShell.ConsoleHost class constructs a M.PS.WrappedDeserializer passing the STDIN TextReader as one of the parameters. By default, the WrappedDeserializer will call ReadLine() on this STDIN TextReader and wait indefinitely, effectively hanging PowerShell and the calling process.

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 572313 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=572313).

    Repro Steps:
    1. Create a simple PowerShell script.
    2. Create a…

    4 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 →
  17. PowerShell does not update ref and out parameters when method throw exception

    Add-Type -TypeDefinition @'

    public static class C {
    
    public static void M(ref int refint, out int outint) {
    refint=10;
    outint=20;
    throw new System.Exception();
    }
    }

    '@
    $a=0
    $b=0
    $a
    $b

    $a and $b will have old value: 0, although method change passed parameters.

    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 Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. The $foreach iterator does not behave properly when processing tokens

    This is a bug in PowerShell 2.0 and later versions (i.e. not a regression).

    The $foreach iterator does not advance inside of a foreach loop when processing tokens that come from the PowerShell parser. For example:

    $Filter = 'foo -eq $false'
    foreach ($token in [System.Management.Automation.PSParser]::Tokenize($Filter,([REF]$null))) {

    if ($token.Type -ne [System.Management.Automation.PSTokenType]::Command) {
    
    continue
    }
    $foreach.MoveNext() &gt; $null
    $foreach.Current

    }

    If you run this, $foreach.Current is $null in the first iteration of the loop (this is wrong), and when you advance the iterator using MoveNext(), it then gets assigned to the first item in the collection.

    The workaround is to force the…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  19. Scripts need better isolation from the user's global session state

    Votes from Connect: 4

    Original Date Submitted: 11/28/2015 5:59:49 AM

    Description:
    Contact Information
    Handle: Keith Hill MVP
    Site Name: PowerShell
    Feedback ID: 2065573


    Problem Description:
    Right now it is too hard to write a 100% reliable script that can run in any particular user's PowerShell console. The crux of the problem is that global session state is so varied amongst individual users it is hard to anticipate all possibilities such as:

    •Command proxies
    •Imported (auto or explicit) modules that implement the same named command (but semantically different)
    •Redirected aliases
    •Defined variables you weren't expecting to be defined
    •Removed globals you…

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. Add a new $PSModule standard variable

    Votes from Connect: 11

    Original Date Submitted: 11/16/2015 11:31:50 PM

    Description:
    Contact Information
    Handle: Stephen Owen
    Site Name: PowerShell
    Feedback ID: 2024074


    Problem Description:
    I find it very tiresome to have to specify $env:ProgramFiles\WindowsPowerShell\Modules in all of my modules. What a pain in the butt!

    Why not add a new standard variable called $PSModulePath or something similar, to make this automatic?

    Product Studio item created by Connect Synchronizer due to creation of feedback ID 2024074 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=2024074).

    Repro Steps:

    Internal BugId: 15978

    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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Feedback and Knowledge Base