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. Some Storage cmdlets do not work in WinPE

    At least Clear-Disk and New-Partition cmdlets from Storage module do not work in Windows PE. Nothing happens if you launch any of them, no any output/result. There may be more cmdlets not working in Windows PE.
    There is a topic on TechNet https://social.technet.microsoft.com/Forums/windowsserver/en-US/3a0e7e9c-f1ea-4324-8a17-f4c447efcbb0/some-storage-cmdlets-do-not-work-under-winpe?forum=winserverpowershell

    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 →
    • Start-Process is behaving strange when -credential switch is used

      When running Start-Process start-process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -cred $(Get-Credential) regardless if the credentials differ from the current consoles credentials or the same credentials are used, the new console window seems to be unresponsive, until you switch back to the console from which the new console was launched and start typing something in that console.

      If the same thing is done in ISE, this issue does not occour.

      I have testet this on PS 5.1.14393.206, 5.1.14393.953 and 5.1.14393.693. Windows Server 2012R2, Windows Server 2016 and Windows 10

      Please see the issue in this video: https://goo.gl/8ZvdEV

      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-WinEvent -ListLog fails for logs with invalid EVTX file paths

        When an event log has an invalid folder path to its EVTX log file, this command throws an exception and fails to read any data about that log from the registry, it simply skips that log object entirely:

        Get-WinEvent -ListLog *

        The error is "Get-WinEvent : Could not retrieve information about the Microsoft-Windows-RetailDemo/Operational log. Error: The system cannot find the path specified."

        The expected behavior is for Get-WinEvent to read the log information out of the registry, even if the log file path is invalid, and output an object with as much information as possible (and not just give up).…

        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 →
        • Get-WinEvent displays wrong MaximumSizeInBytes value

          On Vista and later, the maximum permissible Windows event log size is 18014398509481983 KB.

          When set to this value for the System log (and other logs too presumably) the following command fails to show the maximum log file size correctly:

          Get-WinEvent -ListLog System

          Specifically, the MaximumSizeInBytes value shown is -1024.

          Expected behavior is to show the current max size from the registry in bytes correctly, even if the value is absurdly large.

          A very large max value might be set accidentally or maliciously, and the bug may cause problems detecting or correcting it.

          The above behavior was tested on Windows…

          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 →
          • Copy with chinese string code from ise,paste it into WORD 2016,garbled

            【Bug to reproduce】
            Copy with chinese string code from powerGUI,paste it into word 2016,normal.
            Copy with chinese string code from ise,paste it into word 2016,garbled.

            ------------
            $a = 1
            $b = "字符串"
            # 汉字乱码
            ------------

            【old report link】
            https://connect.microsoft.com/PowerShell/Feedback/Details/2002528

            【powershell version】
            ise in windows 8.1
            ise in windows 10 14393.1066

            microsoft office 2016
            microsoft office 2013

            【reason】
            unknown

            【reporter】
            By the chinese powershell study & research group. QQ group No. is 183173532

            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 →
            • Copy headers when copying from Out-GridView

              It would be great to copy headers for all the columns when copying data from the Out-GridView table lists.

              5 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

                survey  ·  1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
              • Bug: DSC Decryption across Servers not Working

                On 2 Fully Updated Windows Server 2016 Machines running and provisioned from Azure I have created a Pull Server Configuration. I have created the DSC Signing Certificate using a custom template on a Enterprise Root CA which has worked for 2012R2 nodes and also tested using xDSCUtils New-xSelfSignedDscEncryptionCertificate. Using the same Certificate to Compile and Execute the MOF on the same Computer works, it is only if you compile on one and execute on another that the problems arise.
                I kept getting errors when passing in credentials. I therefore wrote a tiny custom DSC Resource that Displays the Password as…

                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

                  investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                • Bug: Here string - When using invoke-command when here string starts with [

                  Using a here string to create an LCM file using a Hyper-V VM and invoke-command.
                  If the here string starts with [ the file created is blank if viewing with get-content. Viewing the file with PSEdit, the file is full of squares.

                  Code used to generate this:

                  $lcmscript = @'
                  [DSCLocalConfigurationManager()]
                  configuration LCMPush
                  {
                  Node $AllNodes.Where{$_.Role -eq "Primary DC"}.Nodename
                  {
                  Settings
                  {
                  RebootNodeIfNeeded = $true
                  ActionAfterReboot = 'ContinueConfiguration'
                  ConfigurationMode = 'ApplyAndAutoCorrect'
                  CertificateID = "REPLACEWITHFRESHLYCREATEDTHUMBPRINT"
                  }
                  }
                  }

                  # Create the computer.meta.mof in folder
                  LCMPush -configurationData c:\dsc\dscconfigdata.psd1 `
                  -OutputPath c:\dsc\LCM
                  '@

                  Invoke-Command -VMName $vmname -Credential $cred -ScriptBlock { New-Item c:\dsc\lcm -ItemType…

                  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

                    5 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →

                    Interesting…I’m not able to repro it from a PowerShell 5.1 to 5.1 box. Could you paste the output of your $PSVersionTable?

                    Also, I’m assuming you’ve saved the script that includes the here string somewhere? Could you paste the output of Format-Hex .\hereString.ps1 | Select-Object -First 1? Even better, could you paste the same thing on the resultant output (i.e. Format-Hex C:\dsc\lcm\dsclcm.ps1 | Select-Object -First 1)?

                  • Convertfrom-json & Foreach-Object Operation vs ScriptBlock statement returns different output

                    Beginning in Windows PowerShell 3.0, there are two different ways to construct a ForEach-Object command. - Yes and no.

                    PS > $p
                    [
                    {
                    "Name": "aaCenter",
                    "Id": 4256
                    },
                    {
                    "Name": "AiNap",
                    "Id": 3408
                    },
                    {
                    "Name": "AllShareDMS",
                    "Id": 5044
                    }
                    ]

                    # Blank result
                    $p | ConvertFrom-Json | % Name

                    #ScriptBlock or invoke GetEnumerator() method works as expected
                    PS > ($p | ConvertFrom-Json).GetEnumerator() | % Name
                    aaCenter
                    AiNap
                    AllShareDMS

                    PS > $p | ConvertFrom-Json | % {$_.Name}
                    aaCenter
                    AiNap
                    AllShareDMS

                    PS > ($p | ConvertFrom-Json).foreach{$_.Name}
                    aaCenter
                    AiNap
                    AllShareDMS

                    # Object doesn't contain a property Name
                    PS > $p |…

                    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 →
                    • 6 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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →

                        Would be interested in understanding the scenario where you are using the cmdlet & specifying the reason for rebooting. To explain: our previous assumption was that users would EITHER use the server UI that captured this information, OR use the cmdlet (often so they didn’t need to supply that reason text).
                        So, what would help is to understand in what situations the cmdlet is being used and specifying the reboot explanation is desirable.

                      • WMF: It's annoying to not have an independent setup for Win10

                        Hello

                        It is really annying that Microsoft still patronizes their Customers and don't allow to setup WMF (e.g. Version 5.1) on Windows 10 without Windows Update / without upgrading to the anniversary release.

                        We have 650 Desktops and we have not yet finished all compatibility tests, but we have Developers which needs WMF 5.1.

                        Please, keep in mind simple, friendly installations and not microsoft internal political decisions.

                        Because there are many Operating Systems with open source package managers, you could peek how they are solving such problems. Since decades.

                        Kind regards, Thomas

                        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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                        • Test-Connection timetolive parameter should be renamed to HopLimit

                          TimeToLive is a misnover for HopLimit. Though this has been corrected in the IPv6 rfc, Test-Connection still references this parameter as TimeToLive, which leads to confuse it with a timeout.

                          5 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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                          • New-CimSession from within a PSJob created by a scheduled task

                            I'm having a strange issue with one of my scripts, where the New-CimSession cmdlet throws out a strange error when the script is run as a scheduled task, but not when I run it interactively under the same user account.

                            The details are described here:
                            https://github.com/PowerShell/PowerShell/issues/3538

                            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 →
                            • Roaming PowerShell profile using OneDrive

                              Most IT pros use multiple computers but can't have a consistent PowerShell experience across computers due to different versions of PS Profile. Keeping a single version of the profile updated and synchronized across computers adds management overhead.

                              Solution:
                              - Make the profile roaming using OneDrive. The following post shows how to synchronize the profile using OneDrive, but having this option out of the box would help.

                              Nice to have:
                              - Allow the user to choose default location for the PowerShell profile

                              Synchronize your PowerShell Profile with OneDrive
                              http://wp.me/p2C5zw-19K

                              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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                              • Curated Module Lists

                                The PowerShell gallery should allow users to create "lists" of modules (think of it as an Amazon wish list).

                                A user could create a "favorites" list and add modules and scripts to it to keep track of their favorites over time (maybe even "subscribe" to notifications of new releases of things on the list).

                                A user could also create a "user management modules" list or a "stretching PowerShell's limits" list or a "should have been in the box" list, or a "things I use in my prompt" list ...

                                But most importantly, users should be able to SHARE those lists,…

                                13 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

                                  survey  ·  0 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                                • aliases should be able to contain parameters

                                  While PowerShell's introduction of aliases to Windows command lines is a (long due) help, they are very limited. Compared to aliases found in Linux shells such as bash, aliases in PowerShell have one glaring weakness: they can only replace a single token with another single token.

                                  For example, on Linux, I can do the following:
                                  # Add default parameters to ls so it shows hidden files and uses color
                                  alias ls='ls -A --color=auto'
                                  # Add an alias that shows ls long-form output and file type indicators
                                  alias ll="ls -lF"

                                  On Po9werShell, I can't do anything like that. "ls" is aliased…

                                  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 Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Gallery help site needs new capability

                                    The documentation site need a menu or link item to quickly switch versions of a help topic. Like the old MSDN site.

                                    Example Site topic: https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Utility/Read-Host

                                    The version access is important for support issues to be able to quickly switch versions as the "-online" with help always targets the current version or nothing.

                                    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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Allow to be cast Dictionary type with [pscustomobject]

                                      $d = New-Object 'system.collections.generic.dictionary[string,string]'
                                      $d.Add("a","1")
                                      $d.Add("b","2")

                                      PS > [pscustomobject]$d

                                      Key Value
                                      --- -----
                                      a 1
                                      b 2

                                      Preferred output should be:

                                      PS > New-Object PsObject -Property $d

                                      a b
                                      - -
                                      1 2

                                      PS > [pscustomobject]@{a=1;b=2}

                                      a b
                                      - -
                                      1 2

                                      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 →
                                      • [BUG] Count property incorrect works with a single WMI object

                                        You can now use Count or Length on any object, even if it didn’t have the property. If the object didn’t have a Count or Length property, it will will return 1 (or 0 for $null). Objects that have Count or Length properties will continue to work as they always have.

                                        # Returns nothing,but should be
                                        PS > (Get-WmiObject -Class Win32_OperatingSystem).Count
                                        PS > (Get-CimInstance -ClassName Win32_OperatingSystem).Count

                                        #Works as expected
                                        PS > (Get-WmiObject -Class Win32_OperatingSystem -Filter "Name=1").Count
                                        0
                                        PS > (Get-CimInstance -ClassName Win32_OperatingSystem -Filter "Name=1").Count
                                        0
                                        PS > (Get-CimInstance -ClassName Win32_Service).Count
                                        230
                                        PS > (Get-WmiObject -Class Win32_Service).Count
                                        230

                                        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 →

                                          I can repro this for sure, but given the difficulty of servicing and the impact of the bug, it’s pretty unlikely to get fixed.

                                          One possible workaround: (Get-CimInstance -ClassName Win32_OperatingSystem -Filter “Name=1″ | Measure-Object).Count

                                        • Collapsed region in dark mode is hardly visible

                                          When using the dark theme in ISE, a collapsed region is hardly visible because the font color is black and the background darkblue. There is no way the set the colors for a collapse region in the theme editor.

                                          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

                                            survey  ·  0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base