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. Make the Continue statement work in ForEach-Object

    Within in ForEach-Object script block, "continue" behaves like "break", and one should use "return" to simulate "continue". But, from my perspective, it would make sense to give "continue" foreach-object awareness

    3 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

      0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    • Double DependsOn in mof when using foreach loops

      When using a foreach loop to create a set of resources and trying to set the previous item key as the dependsOn resource, it adds it twice in the mof file.

      Configuration example:
      configuration Test-DependsOnWithLoop {
      param([string[]]$Directories)
      Import-DscResource -ModuleName PSDesiredStateConfiguration
      node localhost {
      $dependsOn = $null
      $dirs.ForEach({
      $res = $_ -replace '\\|:', '_'
      File $res {
      Ensure = 'Present'
      DestinationPath = $_
      DependsOn = $dependsOn
      Type = 'Directory'
      }
      $dependsOn = "[File]$res"
      })
      }
      }

      $dirs = 1..10 | % { "C:\Temp\_$_" }
      Test-DependsOnWithLoop -Directories $dirs

      And if you look at the localhost.mof you'll see:
      DependsOn = { "[File]C__Temp__1", "[File]C__Temp__1"};

      1 vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

        In Queue  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
      • Bug: Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable

        Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable.

        ##############
        I have customized the PSModulePath:

        PS C:\Users\username> ($env:PSModulePath).split(';')
        C:\Users\username\Documents\WindowsPowerShell\Modules
        C:\Program Files\WindowsPowerShell\Modules
        C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
        c:\Program Files\Microsoft Security Client\MpProvider\
        C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\
        \\my.domain\share\Modules\

        ##############
        If i try to execute e.g. Invoke-RestMethod

        PS C:\Users\username> Invoke-RestMethod
        Invoke-RestMethod : The 'Invoke-RestMethod' command was found in the module 'Microsoft.PowerShell.Utility', but the
        module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
        At line:1 char:1
        + Invoke-RestMethod
        + ~~~~~~~~~~~~~~~~~
        + CategoryInfo : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule


        PS C:\Users\username> Get-Command Invoke-RestMethod
        Get-Command : The term…

        3 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

          1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
        • Powershell ISE crashes when saving an ini file (I tried config.ini)

          I created a new file, saved as config.ini, and then ISE crashed. When I reopened, it crashed again.

          1 vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)

            We’ll send you updates on this idea

            0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
          • powershell_ise has stopped working

            Problem Description:
            I installed KB3134760 update in Server 2008. The powershell_ise has stopped working. Does anyone have the same problem?
            Thanks

            1 vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)

              We’ll send you updates on this idea

              0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
            • Bug: Powershell ISE recovered to wrong integrity level in two sessions

              A crashed powershell ISE session will re-open previously open files.

              There is a bug, though, which manifested when a crash recovery happened to me recently:

              The session/file which I had originally opened in standard user context (no elevation) recovered in High integrity level (aka elevated/admin),
              The session/files which I had originally opened in elevated mode recovered in Medium integrity level (aka standard user mode).

              The session should remember which context it was open in and re-open in the same context.

              Need to consider this issue for normal ISE closure/re-opening, too, as in this UserVoice item:
              "Windows PowerShell ISE: Add ability…

              1 vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)

                We’ll send you updates on this idea

                0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
              • Provide a native ternary operator

                It would be very nice and convenient if PowerShell had a native ternary operator like C# does (https://msdn.microsoft.com/en-us/library/zakwfxx4(v=vs.100).aspx).

                Basically it would allow you to write a short-hand if-else statement, so instead of having to write:

                if ($someBoolCondition)
                {
                $x = $y.Property1
                }
                else
                {
                $x = $y.Property2
                }

                you could just write:

                $x = $someBoolCondition ? $y.Property1 : $y.Property2

                This operator is fairly standard in many programming languages, so it would be awesome if PowerShell could come up to speed with it as well. Thanks.

                2 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                • Bug comparing identical DSC resources with complex properties

                  I have system modules that are deployed in nodes according to the configuration data file (psd1). For example, one node can have three modules, or there may be three nodes each one with a module.
                  All modules have a common configuration, so I put this configuration in a separate composite resource. Then, if there are more than one module in a node, the resulting configuration will have duplicate resources.
                  The problem occur when one of these duplicate resources have some complex property. Here is a simplified version of my configuration:

                  Configuration BaseWebConfiguration
                  {
                  Import-DscResource -ModuleName xWebAdministration

                  xWebsite DefaultSite
                  {
                  Ensure…

                  1 vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                  • Change validation error wording when using [ValidateCount()]

                    When I run a simple function, like the following, I get an error, as expected that I've exceeded the number of values I can specify for the function parameter(-ComputerName). The wording says that I need to "Provide fewer than 3 arguments...". Because I can specify up to 3 arguments, I think the wording needs to change to say something like "Provide no more than 3 arguments,..." or "Provide 3 arguments, or less,...".

                    Function Get-OSInfo
                    {
                    [CmdletBinding()]
                    Param
                    (
                    [ValidateCount(1,3)]
                    [string[]] $ComputerName
                    )
                    Get-WmiObject -Class Win32_OperatingSystem -ComputerName $ComputerName
                    }
                    Get-OSInfo -ComputerName 'one','two','three','four'

                    Get-OSInfo : Cannot validate argument on parameter 'ComputerName'. The…

                    1 vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                    • PowershellGallery - Preview module cmdlet examples

                      Hello,

                      Many PowershellGallery modules's description is just one line that make us difficult to chose among the similar modules.

                      For example, I searched the keyword log, and I got many write-log modules.

                      I need to download each one of them to test the differences.

                      It would be better to preview the cmdlets' examples directly on the web site or provided by find-module.

                      And if possible, it would be even better to be able to upload some GIF photos to the web site to show the cmdlets' power dynamically just like vscode extensions.

                      Thx.

                      1 vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        1 comment  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                      • ordered class

                        Cannot declare [ordered] fields/properties in script classes

                        The following fails to work as expected, in multiple ways:

                        Class Foo { [ordered] $myfield }

                        When executing directly from an interactive shell, the output is:

                        An error occurred while creating the pipeline.
                        + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
                        + FullyQualifiedErrorId : RuntimeException

                        When executed from a script via ". .\myscript.ps1" the error is:

                        Value cannot be null.
                        Parameter name: type
                        At line:1 char:1
                        + . .\myscript.ps1
                        + ~~~~~~~~~~~~~~~~
                        + CategoryInfo : OperationStopped: (:) [], ArgumentNullException
                        + FullyQualifiedErrorId : System.ArgumentNullException

                        What I find especially interesting is that it 'line:1 char:1' regardless of…

                        1 vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                        • When is Powershell v6 due to be released?

                          When is Powershell v6 due to be released Will it work with Windows 10?

                          1 vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                            0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                          • ISE Vi editmode

                            Please make sure that the option:
                            Set-PSReadlineOption -EditMode Vi
                            works as expected in ISE as it does in the powershell.exe so we have a consistent working environment.

                            1 vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                            • PowerShell Core - Workflow Support

                              Workflows in Windows PowerShell are extremely powerful, we've started investigating their use for our user provisioning tasks which need to gracefully handle timing issues, connectivity issues, throttling, etc.

                              We'd really like to be able to run workflows in lightweight configurations like Docker Containers, the Nano Server image is especially attractive as it is so small. Unfortunately PowerShell Core on the Nano Server doesn't currently support workflows, we'd like to see that support added in PowerShell Core.

                              7 votes
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                              • Remote Powershell Session "-ErrorAction Stop" give Non-Terminating Error

                                Script with Remote Powershell that are using Try/Catch and (of course) Terminating error, but for some reason under PSv5.1 Shell now those "-ErrorAction Stop" aren’t producing Terminating Error.

                                I need to force $ErrorActionPreference = “Stop” to have my Try/Catch to work.

                                1 vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                • Get- and Remove-DnsServerResourceRecord deficiencies

                                  Get- and Remove-DnsServerResourceRecord have a couple of deficiencies:

                                  1) most cmdlets support piping from Get-* to Remove-*, this does not currently work properly with Remove-DnsServerResourceRecord...

                                  "The input object cannot be bound because it did not contain the information required to bind all mandatory parameters: ZoneName"

                                  So, the objects returned from Get-DnsServerResourceRecord should contain the ZoneName property.

                                  2) Remove-DnsServerResourceRecord does not respect -Confirm:$false, even when it's specified, it asks for confirmation every time.

                                  i.e. this will ask for confirmation 200 times if you have 200 records (and -ZoneName must be specified because of the aforementioned issue!), at least thankfully you can…

                                  1 vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Management tools powershell modules in PS Gallery

                                    Publish all In-Box PowerShell modules to the gallery so scripted functions that do not actually required the full features can be used. Such as Invoke-GpUpdate.

                                    2 votes
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

                                      0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                    • RSS Feed for Modules

                                      It is currently hard to get notifications when PowerShell modules get updated. It would be nice if there would be an RSS feed for new versions of a package, then my RSS reader could notify me that a new version is available and I could take action.

                                      1 vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)

                                        We’ll send you updates on this idea

                                        0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Dynamic Parameters and Positional parameters do not work as expected

                                        Problem description and example: https://stackoverflow.com/questions/45021674/how-do-you-specify-both-static-and-dynamic-positional-parameters-in-powershell

                                        1) It is not clear that the position attribute is relative to other parameters of the same type, and that static parameters always come before dynamic parameters.
                                        2) If you run get-help (full) on the function described in the link it will show the literal position assignment, not their position as PowerShell expects them (i.e. the static parameter is listed as position 3, when it is actually position 0)
                                        3) Tabbing through the options list (using ISE or PowerShell) behaves according to the literal position assignment, not their position as PowerShell expects them (i.e. if…

                                        1 vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)

                                          We’ll send you updates on this idea

                                          0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Type restrictions when rendering a property as a string in a MOF-file

                                          Dear,

                                          As we use Powershell V5 Classes extensively, we create instances of a class and add them to a Hashtable.

                                          This hashtable is assigned to an member of a DSC Resource. When creating the .MOF file, I receive an System.ArgumentException on the DSC resource "PSDesiredStateConfiguration.psm1"

                                          -> Only certain basic-types are allowed to be serialized to MOF-file :
                                          $elementsAsStrings = foreach ($p in $Value.GetEnumerator())
                                          {
                                          if($p.Value -isnot [string] -and
                                          $p.Value -isnot [char] -and
                                          $p.Value -isnot [int64] -and
                                          $p.Value -isnot [uint64] -and
                                          $p.Value -isnot [double] -and
                                          $p.Value -isnot [bool] -and
                                          $p.Value -isnot [datetime] -and
                                          $p.Value -isnot [ScriptBlock])
                                          {
                                          $errorMessage = $LocalizedData.HashtableElementTypeNotAllowed -f…

                                          1 vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)

                                            We’ll send you updates on this idea

                                            0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base