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.

Please feel free to provide feedback or file bugs here.

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. "Using module" statement does not reload module after changes are made

    Problem Description
    ------------------
    If you are using the `using module` statement, it will load the module without any issues. However, if you make a change to the module and run the `using module` statement again without restarting your PowerShell session, it will not load the new modified module into memory, and instead will continue to use the old existing module that was loaded. This makes doing development with `using module` statements very tedious as you must continually reload your PowerShell session whenever you make changes to the module.

    Ideally we would just use `Import-Module -Name [module name] -Force` to avoid…

    12 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

      0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    • Errors that terminate script due to -ErrorAction Stop do not show correct line number

      PS > type .\error.ps1
      [Cmdletbinding()]
      param()

      "hello"
      "world"

      1/0

      PS > .\error.ps1
      hello
      world
      Attempted to divide by zero.
      At D:\junk\error.ps1:10 char:5
      + 1/0
      + ~~~
      + CategoryInfo : NotSpecified: (:) [], RuntimeException
      + FullyQualifiedErrorId : RuntimeException

      PS > $ErrorActionPreference = "Stop"
      PS > .\error.ps1
      hello
      world
      D:\junk\error.ps1 : Attempted to divide by zero.
      At line:1 char:1
      + .\error.ps1
      + ~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [error.ps1], RuntimeException
      + FullyQualifiedErrorId : RuntimeException,error.ps1

      Note incorrect line number being reported on second invocation when ErrorActionPreference equals "Stop"

      This can also be reproduced by putting "$ErrorActionPreference = "Stop" at line 3 of the…

      3 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

        0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
      • Receive-Job duplicates Write-Host output

        Starting in PowerShell 5.1, if a background job uses Write-Host, the Receive-Job cmdlet shows each line of output twice.

        # Steps to Reproduce
        1. Run this command: `Start-Job { 1..10 | % { Start-Sleep -Milliseconds 10 ; Write-Host $_ } } | Wait-Job | Receive-Job`
        2. Note the duplicate numbers. This error does not happen in Powershell 6.0.4.

        2 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)

          We’ll send you updates on this idea

          2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
        • Backport Powershell 6.x to Windows Powershell

          To keep Windows Powershell up to date please backport any new features from Powershell 6.x to Windows Powershell.

          5 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)

            We’ll send you updates on this idea

            1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
          • Bug: Invoke-WebRequest keeps downloading beyond the file's size

            Migrated from here: https://github.com/PowerShell/PowerShell/issues/7822.

            To repro:

            powershell wget https://storage.googleapis.com/chrome-infra/depot_tools.zip

            The file size is ~19MB, but the download progress goes way beyond that and has to be manually stopped.

            At the same time, (New-Object System.Net.WebClient).DownloadFile() works correctly.

            2 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)

              We’ll send you updates on this idea

              0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
            • Bug: Powershell doesn't deal with returning empty arrays from functions to methods

              Given this module:
              class TestClass {
              [object]ReturnEmptyArray() {
              $testobject = Get-EmptyArray
              if($testobject -eq $null){
              Write-Host "Is Null"
              }
              return $testObject
              }

              [object]ReturnNull() {
              $testobject = Get-Null
              if($testobject -eq $null){
              Write-Host "Is Null"
              }
              return $testObject
              }
              }

              function Get-EmptyArray {
              return @()
              }

              function Get-Null {
              return $null
              }

              function Get-TestClass {
              return [TestClass]::new()
              }

              Export-ModuleMember Get-BlackDuckProject, Invoke-BlackDuckUrl, Get-TestClass

              the following works as expected:
              $test = Get-TestClass
              $test.ReturnNull()
              (a $null is returned)

              However, the following throws an exception:
              $test.ReturnEmptyArray()
              Index was out of range. Must be non-negative and less than the size of the collection.
              Parameter name: index

              1 vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)

                We’ll send you updates on this idea

                0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
              • Bug: wrongly displayed elements in an array with different types

                This issue is easy to reproduce, just simplely put 2 objects of different types in an array variable, output the variable, and then change the 2 elements' order in the array, output the array variable again, you'll see the difference:
                > only the 1st element will be displayed in its correct format; the subsequent elements are displayed in the full output format.

                More details please refer to the gitlab issue:
                https://github.com/PowerShell/PowerShell/issues/7839#issuecomment-424193334

                1 vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                • 1 vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                  • Allow trailing commas

                    Trailing commas in lists are incredibly useful in a large number of instances, and there are very few good reasons and no really strong reasons not to.

                    Not allowing trailing commas is inconvenient in many situations: it frequently turns a one-line commit into two, polluting history (all I did was remove a comma from that line); it can complicate (and often put bugs in) code-generation ("$str += $value + "," doesn't cut it)

                    1 vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                    • Issue with running commands on remote machine

                      Hi Team,

                      I am using powershell to trigger commands on remote machine (as this doesn't require anything additional package to install). Recently I am facing issues with running commands on remote machine.

                      $ComputerName = "***.***.***.***"

                      Function ExecuteCommand() {
                      Get-PSDrive
                      }

                      Set-Item WSMan:\localhost\Client\Trustedhosts -Value $ComputerName -Concatenate -Force

                      $Credentials = Import-Clixml $CredentialsFile

                      Invoke-Command -ComputerName $ComputerName -Credential $Credentials -ScriptBlock ${function:ExecuteCommand} -HideComputerName

                      I am storing the credentials in the file and using the above script to run commands on remote machine.

                      1. Get-PSDrive doesn't return mapped network drive details.
                      2. using net use command to map network path. Network path gets mapped successfully but…

                      1 vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                      • 1 vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                        • Code analysis inside of a try block in a class thinks a variable isn't assigned when it is.

                          Import-Module says that $variable2 is not assigned, but there is no way to reach its usage in the Write-Host without the variable having a value.

                          Class MyClass {
                          DoThing() {
                          $variable1 = "var1"
                          try {
                          $variable2 = "var2"
                          } finally {
                          Write-Host "Tidying"
                          }

                          Write-Host $variable1
                          Write-Host $variable2
                          }
                          }

                          1 vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                          • Start-Process EncodedCommand (RedirectStandardError) v5.1

                            The following script demonstrates an issue I'm experiencing after moving from PowerShell v4 to v5.1. I make extensive use of Start-Process redirecting StandardError to a file, if this file contains data after execution I can read the file to see what the issue was.

                            However, with v5.1 when the launched PowerShell process starts, it makes use of progress output which is on the error stream, so this is redirected to the error file.

                            In previous versions of PowerShell this did not happen.

                            The output to the script below is as follows:

                            Powershell v4
                            ------------------
                            WARNING: Standard Error
                            WARNING: Standard Out …

                            1 vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                            • Timing Invoke-WebRequest Is Slower in Console than ISE

                              We are running a home-grown internet speedtest using a PowerShell script. When running the script in ISE on fast network connections (100mbps+), the Invoke-WebRequest commands run fast enough to reflect 100mbps. However, when the script is run through console, the Invoke-WebRequest is restricted and reports speeds of only 25mbps. How can the console be configured to run with the same resources as ISE?

                              FYI, this is not an issue for slower networks. Only fast networks seem to expose the console bottleneck.

                              2 votes
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                              • Bug: -Exclude does not work as -Include does in Get-ChildItem, or as expected

                                Three folders; d1, d2, d3, with files test.txt and test.mp3 in in d1 and d3.

                                '-Include *d1*' includes only content from d1. Would expect '-Exclude *d1*' to include the inverse, but it has no effect, it returns all data.

                                unless it's run after -Include.

                                So '-Include *d1* -Exclude *d1*' returns nothing, as expected.

                                Exclude only works as it applies to a file name, not a path.

                                So '-Exclude *.txt' will exclude all files '*.txt' as expected.

                                The syntax usage in the help file is identical for both parameters.

                                Please fix -Exclude parameter so that it works on the Path consistently,…

                                2 votes
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                • 1 vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                    2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                  • format-volume whatif

                                    format-volume with option -whatif not working. It's should "Shows what would happen if the cmdlet runs. The cmdlet is NOT RUN."

                                    1 vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

                                      0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Support CamelHumps for tab completion

                                      CamelHump tab autocompletion would be nice, e.g., `cd CH<tab>` would expand to `CamelHump` if a directory by that name existed. This would be nice for any directories in CamelCase.

                                      1 vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)

                                        We’ll send you updates on this idea

                                        0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                      • provide switches for toggles

                                        admit it, PS is ugly. with the multitudes of loops we have to jump thru to get a desired result, it would be better if you could provide command line switches for common tasks.

                                        for example, in a select statement, how do you prevent the header from appearing in the output? would be nice if could just do "select -NoHeader …." but you can't.

                                        that is just one example where I spent 30 minutes looking for a way to display only without headers in a "select" statement. a lot of our searches involves either an object has or has not…

                                        1 vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          Signed in as (Sign out)

                                          We’ll send you updates on this idea

                                          0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Inconsistent Array Initialization Behaviour

                                          Creating an array of arrays as below works well:

                                          $myArray = @(
                                          @(1,2,3),
                                          @(4,5,6)
                                          )
                                          $myArray[0] #outputs 1, 2, 3
                                          $myArray[1] #outputs 4, 5, 6

                                          $myBuggyArray = @(
                                          @(1,2,3)
                                          ,@(4,5,6)
                                          )
                                          $myBuggyArray[0] #outputs 1
                                          $myBuggyArray[3] #outputs 4, 5, 6

                                          I wouldn't expect the order of line break & comma to impact the behaviour of the command / can't find any documentation stating that it should.

                                          PSVersion: 5.1.14409.1012

                                          6 votes
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            Signed in as (Sign out)

                                            We’ll send you updates on this idea

                                            3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 20 21
                                          • Don't see your idea?

                                          Feedback and Knowledge Base