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. 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

    4 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 →
    • Enable configuration version tracking for compiled DSC configurations

      As a part of infrastructure as code or using DSC in the deployment pipelines, it is desired that we be able to identify the version of the node configuration. With all configurations being put into a source / version control repository, it won't be difficult to promote the version number for a given configuration document. However, at this point in time, there is no way to specify the version of the configuration document itself anywhere. This makes it hard to determine or identify what version of the configuration is being used on a target node without using a 3rd party…

      28 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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
      • Better Write-Progress bar, like in yarn.

        The current Write-Progress bar is ugly, and shows at the top of the sreen. Showing yello text over dark cyan, representing progress with some weird circles...

        It should be more like the yarn progress bar, that shows immediately after the command.

        https://imgur.com/GfJRHfp

        7 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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
        • Dynamic param is silently ignored

          Dynamic param is silently ignored, and no errors are thrown when CmdletBinding is not defined.

          [CmdletBinding()]
          Param()

          The following code should either run successfully, or throw an error:

          Function Add-Control() {
          DynamicParam {
          $ParamAttribute = New-Object Parameter
          $ParamAttribute.Mandatory = $true
          $ParamAttribute.ParameterSetName = '__AllParameterSets'

          $AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute]

          $AttributeCollection.Add($ParamAttribute)

          $controlTypes = @("TextBox", "Label", "DataGrid")

          $AttributeCollection.Add((New-Object ValidateSet($controlTypes)))

          $RuntimeParam = New-Object System.Management.Automation.RuntimeDefinedParameter('Type', [string], $AttributeCollection)

          $RuntimeParamDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary

          $RuntimeParamDictionary.Add('Type', $RuntimeParam)

          return $RuntimeParamDictionary
          }

          Process {
          Write-Host ($PSBoundParameters['Type'])
          }
          }

          Add-Control -Type "Test"
          # $null

          4 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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
          • BUG: binary module loading fails silently on Fall Creators update on some machines

            occurs in PS 5.1 on Windows 10, Fall Creators update
            First observed with SqlServer module 21.0.17199
            Also occurs with PsWindowsUpdate v2.0.0.0 , SqlServer 21.0.17224

            Pretty much what it says - with either autoload or Import-Module, the module loads with no complaints but the cmdlets aren't there. The assemblies _do_ get loaded into the appdomain. I found no obvious clues poking around with ProcMon and Trace-Command (obvious to me, anyway). Happens on some machines, not others. Reported by 3 users (that I know of), in each case after updating to the Fall Creators update. If you have any debugging hints, they'd…

            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

              4 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
            • PowerShell sessions don't support mixed-culture values such as 'en-DE'

              Note: This may ultimately require resolution in the .NET framework.

              Recent versions of Windows 10 support mixed culture values such as `en-DE` (sic) (since version 1703 - see https://msdn.microsoft.com/en-us/library/cc233982.aspx)

              After using, e.g., `Set-Culture en-DE` to set the culture for future PowerShell sessions (which in itself succeeds, as you can verify at registry location [HKEY_CURRENT_USER\Control Panel\International]), subsequent PowerShell sessions quietly fall back onto culture 'en-US', as reflected in $PSCulture and [cultureinfo]::CurrentCulture.

              Note that such a mixed culture *is* honored in PowerShell *Core*.

              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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
              • Graphical bug in PSVersion 5.1.16299.248

                Hi there

                I've never used the powershell very much. Today I discovered this graphical bug in the rendering of the console text output:
                https://i.imgur.com/H40F15W.png
                This bug was very confusing at first. Then it just kept getting more irritating.
                The bug appears when I scroll up and down, at the bottom of the window. Sometimes text gets cut off at the sides too, but only if I change the window width.
                I think I remember I had similiar issues years ago on a different computer.

                I couldn't find anything related on google. Maybe I used the wrong search terms?

                Although totally…

                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 →
                • TrimStart() method trimming more than specified

                  Attempting to compare two strings. When constructing one of the strings, the TrimStart method is trimming more of the string than it should. Example:

                  (Get-Content -Path 'C:\Program Files\SplunkUniversalForwarder\etc\system\local\server.conf' | Select-String -Pattern 'serverName').ToString().TrimStart('serverName = ')

                  returns

                  rver1.domain.company.com

                  expected output is

                  server1.domain.company.com

                  I expanded the TrimStart method like so:

                  (Get-Content -Path 'C:\Program Files\SplunkUniversalForwarder\etc\system\local\server.conf' | Select-String -Pattern 'serverName').ToString().TrimStart('serverName').TrimStart(' ').TrimStart('=').TrimStart(' ')

                  and get the same erroneous output. The problem appears to be with trimming the last space character.

                  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  ·  Microsoft.PowerShell.* Modules  ·  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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                    • Set-Location/Push-Location should update process' current directory

                      The Set-Location/Push-Location cmdlets do not update the calling process' current directory. This leads to surprising behavior when working with non-PowerShell APIs. Simple example below.

                      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

                        1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                      • BUG: The certificate for the WMF 5.1 setup has expired WMF 5.1 cannot be installed

                        The certificate for Win7AndW2K8R2-KB3191566-x64.msu has expire and installing WMF 5.1 fails with the following error in Event Log/Windows Logs/Setup

                        Windows update "Update for Windows (KB3191566)" could not be installed because of error 2148204801 "A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file." (Command line: ""C:\Windows\system32\wusa.exe" "C:\Users\username\Downloads\Win7AndW2K8R2-KB3191566-x64\Win7AndW2K8R2-KB3191566-x64.msu" ")

                        Is WMF 5.1 still supported?

                        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

                          2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                        • Some new default cmdlet parameters?

                          We have -ErrorVariable and -WarningVariable. To capture verbose output to a variable, you can $VerboseRecords = (Write-Verbose -Verbose "test") 4>&1 # and find it in $VerboseRecords.Message, but wouldn't it make sense to add a -VerboseVariable? Maybe even a -WriteHostVariable?

                          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

                            2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                          • Support for NPM type version strings in PowerShell module manifest

                            packages.json in NPM (NodeJS in general) supports prefixes in the version string to specify a minimum required with minor and minor/patch versions being a variable. For example,

                            The tilde matches the most recent minor version (the middle number). ~1.2.3 will match all 1.2.x versions but won't match 1.3.0.

                            The caret provides better flexibility. It will refer to the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.

                            Also, an asterisk (*) indicates that the latest version of the module is needed.

                            Implementing this type of version specification in…

                            9 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  ·  Package Management  ·  Flag idea as inappropriate…  ·  Admin →
                            • Get-Certificate -SubjectAlternativeName

                              Provide a means to specify an alternative Subject Alternative Name in the Certificate request. I have a need for requesting certificates with a specific CN for the subject name and they need to be supplied with a UPN in the subject Alternative Name Field. Currently the only option appears to be a -DNSName flag

                              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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                              • [Bug] Paste doesn't work in ReadConsole() windows api prompt

                                This bug may present a low-risk security concern for unaware end users, as reported in openssl here: https://github.com/openssl/openssl/issues/5864
                                This bug should provide enough detail about the "password paste" problem we were seeing in powershell. In my opinion clipboard text should be able to be pasted (though not visible, as is the case with regular keyboard typing).

                                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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                • Powershell and SCCM: Reporting and Querying Request

                                  It is exciting SCCM supports powershell, but it would be really great with some additional cmdlets focusing more on reporting and querying information.

                                  Querying user or device information through powershell would be great as we could then manipulate and generate CSV files of that data. Scripting of data involving attributes such as OS, IP, primary user, primary device, A/V alerts, etc. would be tremendously helpful.

                                  Additionally, cmdlets that allowed resolution of hostname from IP and vice versa would be helpful (sure, we could query other systems, but there are reasons why we wanted this info from SCCM specifically). Scripting resolution…

                                  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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Add 'StopExisting' as a valid argument for New-ScheduledSettingsSet -MultipleInstances

                                    Only Parallel, Queue, and IgnoreNew are supported right now. One would expect that the option available from the Task Scheduler GUI would be available in the powershell interface.

                                    Steps to reproduce

                                    $a = New-ScheduledTaskSettingsSet -MultipleInstances StopExisting

                                    Expected behavior

                                    The task's multiple instances policy is set to kill existing tasks before starting another instance.
                                    Actual behavior

                                    value "StopExisting" to type "Microsoft.PowerShell.Cmdletization.GeneratedTypes.ScheduledTask.MultipleInstancesEnum".
                                    Error: "Unable to match the identifier name StopExisting to a valid enumerator name. Specify one of the following
                                    enumerator names and try again:
                                    Parallel, Queue, IgnoreNew"
                                    At line:1 char:131
                                    + ... ngOnBatteries -ExecutionTimeLimit $b -MultipleInstances StopExisting
                                    + ~~~~~~~~~~~~
                                    + CategoryInfo…

                                    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 →
                                    • PowerShell does not fully convert a hashtable passed to a PSCustomObject parameter

                                      When passing a hashtable to a function parameter that expects a PSCustomObject, PowerShell does not fully convert the hashtable to a PSCustomObject type.

                                      function Test-1 {
                                      param(
                                      [PSCustomObject] $Foo
                                      )

                                      Write-Host "`$Foo's type is: $( $Foo.GetType().Name )" -Fore Green
                                      Write-Host "`$Foo is a PSCustomObject: $( $Foo -is [PSCustomObject] )" -Fore Green
                                      Write-Host "`$Foo has these properties:" -Fore Green

                                      foreach ($prop in ($Foo | Get-Member -MemberType NoteProperty| Select -ExpandProperty Name))
                                      {
                                      Write-Host "`t$prop" -Fore Green
                                      }
                                      }

                                      PS C:\Users\dabelc> Test-1 -Foo ( @{ "CustomProp" = "Value" } )
                                      $Foo's type is: Hashtable
                                      $Foo is a PSCustomObject: True
                                      $Foo has these properties:

                                      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 →
                                      • Write-Verbose should be controllable

                                        Hello

                                        Although "UserVoice" is misused by M$$ to silence customers(!) (e.g. errors(!), which are easy to correct, are ignored for years)
                                        I still write a suggestion for improvement.

                                        Usually, the `-verbose` switch is used if one would like to get more information about _one_ module or script.
                                        The reality is, however, that we're flooded with verbose messages.

                                        Therefore it would be great if `-verbose` could be controlled. Just two ideas:
                                        - By specifying a nesting level, e.g. `-Verbose <NestingLevel>`
                                        `-Verbose 2` would activate verbose messages in the directly called script and in all commands which are called by the script…

                                        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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Unable to use PowerShell Transcription with Active Directory Administrative Console (ADAC)

                                          Setup group policy to enable PowerShell Transcripting. From a machine that has that policy applied, launch ADAC. The error "Cannot connect to any domain. Refresh or try again when connection is available." pops up and ADAC can't be used.

                                          https://github.com/PowerShell/PowerShell/issues/3021

                                          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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 66 67
                                          • Don't see your idea?

                                          Feedback and Knowledge Base