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. Set-mpioSetting -NewRetryInterval input validation is too strict

    When I run the following command in powershell
    (Windows Server 2012 R2, PS Version - 5.1.14409.1005)

    "Set-mpioSetting -NewRetryInterval 1 "
    returns the error
    "Set-MPIOSetting : Cannot validate argument on parameter 'NewRetryInterval'. The 1 argument is less than the minimum allowed range of 3. Supply an argument that is greater than or equal to 3 and then try the command again."

    The documentation at https://docs.microsoft.com/en-us/powershell/module/mpio/set-mpiosetting?view=win10-ps says that the default is 1 second, and we can use the GUI to be able to set the retry interval, but I want to be able to use powershell to automate the configuration of my…

    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
    • Export-ODataEndpointProxy duplicate key sequence errors on redfish endpoint

      I'm getting some parse issues with Export-ODataEndpointProxy. It creates 119 cdxml files from my Redfish endpoint, but 8 of them have "duplicate key sequence" errors. That's pretty good at 8 of 119, but I'm unable to run any cmdlets because when I Import-Module on the folder of cdxml files, it returns the "duplicate key sequence" errors.

      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 →
      • 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 →
        • Bug: The Get-ADGroupMember -Recursive option doesn't work correctly

          Get-ADGroupMember -Recursive only reads the Group Members property. It does not also add users to the list who have a group as their primary group. Here is what it should be doing...

          (Get-ADGroupMember -Identity "Domain Admins" | select distinguishedName).distinguishedName

          Here is what it is actually doing...

          Get-ADGroup -Identity "Domain Admins" -Properties Member | select -ExpandProperty member

          Which is a different answer!

          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 →
          • 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 →
            • 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 →
              • Powershell 5.1 returns error on special characters when passing in an array of arguments

                Hello,

                I have Set the arguments in the code:

                $installArguments = "`"-p`" `"$ISMFileFolder`" -o `"$MergeModuleFolder`" -y `"$VersionNumber`" $PathVariableArguments -b `"$MediaOutputFolder`""

                and run the exe with arguments:
                & $IScmdBldRootDir $installArguments
                The same scripts is running fine on Windows server 2008 R2 that has the Powershell 4.0 and it fails and return error on Windows server 2016 that has the Powershell 5.1.
                The error is:
                -1113: The 'p E:\Builds\Installer' switch is not recognized.

                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 commandlets to configure NAT in the RemoteAccess module

                  Please, expand the RemoteAccess module with commandlets that allow you to configure simple NAT like you would do with the RRAS GUI.
                  So far, the module allow you to configure Direct Access and VPN but not NAT and it feels like it's missing.

                  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 SNMP Cmdlets (Get, Walk, Table, etc.)

                    Hi,

                    it would be very useful to have SNMP cmdlets available. SNMP is still defacto standard for managing many kinds of 'network-devices'.

                    It could help also considering IOT devices.

                    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 →
                    • 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 →
                      • 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 →
                        • Shared or Custom-Common Parameters for PowerShell Modules

                          I would like a way to define common parameters that all functions within that module or perhaps session share. I moved to a new position and am refactoring my automation to work in a new paradigm. This means changing a bunch of parameter names to make sense. It's about 100 cmdlets and only slightly more complex than search and replace, but still I thought to myself "There has to be a better way"

                          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 →
                          • Allow Us to Use our MSA to Report Errors in Microsoft Documentation

                            I will NOT create another account (in GetHub) to report errors in the official Microsoft documentation. I should use my MSA account. There are several errors in the documentation for Set-ADUser, for example, that I reported years ago in Connect (now retired). The documentation for the -Office and -Replace parameters are wrong.

                            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 →
                            • Change sorting of Get-ChildItem -Recurse, it currently tears content appart

                              > Get-ChildItem -Name -Recurse -Directory

                              ... currently tears directories appart because it FIRST iterates through a directory and THEN iterates through its childen recursively (I added blank lines to the output here to emphasize the issue):

                              a
                              b
                              c

                              a\1
                              a\2
                              a\3

                              a\1\x

                              b\a
                              b\b
                              b\c

                              b\b\a
                              b\b\b

                              b\b\a\x
                              b\b\b\1
                              b\b\b\2

                              c\1
                              c\2
                              c\3

                              I believe this kind of sorting doesn't make much sense.

                              I couldn't think of any use case to deal with some parent information item without processing its children and then, after other parent information items have been dealt with (probably even relying on a thorough processing…

                              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 →
                              • Represent $null values Active Directory fields when exporting to CSV files

                                Using Export-CSV should represent $null values from Active Directory by printing "null" in the column instead of just removing the column for that line.

                                When using the Get-ADUser cmdlet to export properties of User accounts to a CSV file (Export-CSV), $null values are not represented and therefore end up being removed from the CSV. For example, if I am exporting the properties for SAMAccountName, Title, and Manager to my CSV and User A has all three properties but User B has no Title, then User B's Manager is now listed in the Title column of the CSV, which causes data…

                                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 →
                                • Test-NetConnection doesn't fully honor -ErrorAction

                                  When I run:
                                  > Test-NetConnection my.host.net -port 443 -ErrorAction Ignore

                                  An error ends up in $Error like:
                                  Resolve-DnsName : my.host.net : DNS record does not exist
                                  At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\NetTCPIP\Test-NetConnection.psm1:314 char:63
                                  + ... ecords = @( Resolve-DnsName $ComputerName -LlmnrNetbiosOnly -NoHost ...
                                  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  + CategoryInfo : ResourceUnavailable: (my.host.net:String) [Resolve-DnsName], Win32Exception
                                  + FullyQualifiedErrorId : RECORD_DOES_NOT_EXIST,Microsoft.DnsClient.Commands.ResolveDnsName

                                  Looks like Test-NetConnection.psm1 @ lines 313 - 315 has the error preference for the Resolve-DNSName calls hard coded. Specifying -Ignore should not result in anything in $Error.

                                  $PSVersionTable

                                  Name Value
                                  ---- -----
                                  PSVersion 5.1.16299.248
                                  PSEdition Desktop
                                  PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.16299.248}
                                  BuildVersion 10.0.16299.248
                                  CLRVersion 4.0.30319.42000
                                  WSManStackVersion…

                                  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 →
                                  • Format-Table: Add ForegroundColor and BackgroundColor to a calculated property

                                    When using calculated properties in Format-Table, you can define:
                                    - Name/Label (the column heading/calculated property name)
                                    - Expression
                                    - Width (define column width)
                                    - FormatString (to format numbers/strings)
                                    - Alignment (alignment in table cell/column

                                    What's missing is a way to output a calculated property in a different color. For example, use red for negative number, green for positive number, and additionally, a way to specify the background color (for the table cell). Adding ForegroundColor (to specify text color) and BackgroundColor (for cell color) to calculated properties would resolve this.

                                    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 →
                                    • Issue: Verbosity within ScriptsToProcess upon Importing a Module with Verbose switch

                                      Upon running the Import-Module with the verbose flag my script within "ScriptsToProcess" section contains verbose logging but does not output to the console. I am not sure if this is by design, but I thought by passing in the Verbose option would update the session $VerbosePrefence value and have any verbose logging within the ScriptsToProcess output, but it does not.

                                      Is this by design? If yes, then what is your suggestion to output the verbose logging?

                                      My local env:

                                      Name Value
                                      ---- -----
                                      PSVersion 4.0
                                      WSManStackVersion 3.0
                                      SerializationVersion 1.1.0.1
                                      CLRVersion 4.0.30319.42000
                                      BuildVersion 6.3.9600.18773
                                      PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
                                      PSRemotingProtocolVersion 2.2

                                      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 →
                                      • something killed my directories under PackageManagement - need repair (how ?)

                                        Something killed my Directory for all Packages.... How can i repair the Powershell-Installation withing Windows 10 ?
                                        Already tried deactivating / activation of the feature withing windows, sfc /scannow , etc.
                                        but i cannot use my powershell completely anymore...

                                        $PSVersionTable

                                        Name Value
                                        ---- -----
                                        PSVersion 5.1.15063.786
                                        PSEdition Desktop
                                        PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                        BuildVersion 10.0.15063.786
                                        CLRVersion 4.0.30319.42000
                                        WSManStackVersion 3.0
                                        PSRemotingProtocolVersion 2.3
                                        SerializationVersion 1.1.0.1

                                        Example of issue:
                                        Method invocation failed because [Microsoft.PowerShell.Commands.MatchInfo] does not contain a method named 'Trimstart'.

                                        so also basics are not even working .....

                                        can anyone help me ?

                                        thanks

                                        Markus

                                        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 →
                                        • A strange idea: why not work using pipeline objects, e.g. in Add-WindowsCapability?

                                          Microsoft is proud that PowerShell works with objects and never gets tired of announcing this wonderful achievement everywhere.

                                          Now I have an apparently extraordinary idea:

                                          Why does M$ not *always* and mandatory work with the objects, so that commands of the same subject automatically understand each other?

                                          This would allow us commands as we expect it. Without googling for solutions... once more. Such commands must simply work:

                                          Get-WindowsCapability -Online? Name -like' OpenSSH. Client*'. | Add-WindowsCapability

                                          The current M$ "solution" is that very often we have to handle properties and therefore we fall back to the string handling.

                                          Annoyoing.
                                          Very Annoyoing…

                                          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 →
                                          ← Previous 1 3 4 5 6 7 8
                                          • Don't see your idea?

                                          Feedback and Knowledge Base