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. Message Cannot unprotect message. The input contained no encrypted content

    When upgrading to WMF 5.1, we are seeing errors in the DSC event log on servers that use a configuration with encrypted content (passwords). We are using encrypted credentials to create application pools and assign a service account as the identity. The data gets decrypted fine and the app pools get created with the correct identities. However the following error gets logged in the DSC event log every time a consistency check runs:

    Job :
    Message Cannot unprotect message. The input contained no encrypted content. Specify the '-IncludeContext' parameter if you wish to output the original content when no encrypted…

    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

      investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    • Resolve-Path returns null if the file name contains brackets

      To reproduce: Create a file: c:\temp\[filename].txt

      $script = Get-ChildItem "C:\Temp\[filename].txt"
      Resolve-Path $script

      Error:
      Resolve-Path : Cannot bind argument to parameter 'Path' because it is null.

      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 →
      • VSTS InvokeRestMethod -OutFile with -PassThru

        Summary:
        Using a powershell script to retrieve information from VSTS for a particular project and return results to the powershell command window and a .json file.

        According to: https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.utility/invoke-restmethod

        PassThru is only used with OutFile when you would like to see a return in command window and in a file. At least that is the understanding when reading the documentation. *Complete code below

        Expected Result: Display results in the powershell command window and also send the results to a file.

        Actual Result: Results are returned in the powershell command window, not in .json format even though it's specified, and 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 →
        • Creators update: stop-computer : Privilege not held

          I ran into this one, after I noticed my newly patched workstation was still turned on in the morning even though I had explicitly requested it to shutdown at a certain time. Basically the repro steps are as follows:

          > Open Non-Administrative Shell
          > Stop-Computer
          Output:
          stop-computer : Privilege not held.
          At line:1 char:1
          + stop-computer
          + ~~~~~~~~~~~~~
          + CategoryInfo : InvalidOperation: (***:String) [Stop-Computer], ManagementException
          + FullyQualifiedErrorId : StopComputerException,Microsoft.PowerShell.Commands.StopComputerCommand

          Administrative shell works as expected, this specific workstation has never participated in any fast/slow ring builds. Windows version is 15063.138

          Another Windows 10 system, fast ring, that is on build 15063.14…

          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

            1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →

            FYI, we’re aware of this problem and are currently investigating it.

            Other threads here that we’re aware of:

            I THINK we understand the problem, but I can’t offer an ETA on a fix right now, unfortunately.

          • ValueFromPipeline taking precedence over ValueFromPipelineByPropertyName

            When a cmdlet has a -value parameter that accepts pipeline data both ByValue and ByPropertyName it always takes it by value. I have seen this in both Set-Variable and Set-Content using PowerShell v5.

            For example, consider the following code:

            [PSCustomObject]@{
            'Path' = 'C:\Temp\MyFile.txt'
            'Value' = 'PowerShell is fun!'
            } | Set-Content

            The above does create the file C:\Temp\MyFile.txt (assuming the directory path exists), but the content is not what I would expect. What I would expect is that the file contain the text 'PowerShell is fun!' and nothing else. What it instead contains is a hashtable representing the entire object:

            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 →
            • Add semicolon as a multi-line statement completion in lieu of back-tick

              Hate back-tick

              Reminds me VB 1.0

              Add a language (parser) support to use multi line statement completion char (don't re invent, use semicolon) in lieu of back tick as statement continuation on each line.

              Don't have to kill back-tick, let it be there for backward compatibility.

              Semi colon as statement completion (no back tick) can be an addition to the language.

              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 →
              • Need a PowerShell version of tpmvscmgr.exe to manage TPM smart cards

                We need a PowerShell version of tpmvscmgr.exe to manage TPM virtual smart cards.

                The tpmvscmgr.exe tool 1) does not accept PIN, PUK and AdminKey numbers as arguments, these must be entered interactively in powershell.exe only, not ISE or with a pop-up, 2) cannot list currently existing virtual smart card ID strings, and 3) is somewhat crude in how it manages card lockout policies and unlocks.

                This is needed not just for Windows clients, but also because Server 2016 Hyper-V supports virtual smart cards for guest VMs, such as for VDI scenarios.

                We need to be able to pass in PIN,…

                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 →
                • Win32_ComputerSystem Username does not show disconnected sessions

                  Yet another script to determine if it will be disruptive to reboot a workstation. Win32_ComputerSystem.Username is blank if the user(s) have locked the computer (I'm pretty sure this is considered session disconnect). Is there a way to find the users who are logged on but not actively?

                  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  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
                  • Cmdlet version compatibility

                    We need to define with wich version of Powershel and which operating system cmdlets are compatible.

                    Could we have this compatibility matrix for each cmdlet in the documentation and also in the help section of each cmdlet?

                    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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                    • Make filtering easier by including all properties as parameters

                      Maybe the best way I can explain this is by giving an example.

                      The following does not work (but should):

                      PS> Get-Service -Status Running

                      When you run

                      PS> Get-Service

                      you're shown a few columns of data, one of which is Status. To do what I want to do above, you have to write the following:

                      PS> Get-Service | ? {$_.Status -eq "Running"}

                      This should no longer be considered good UX.

                      To put a little polish on this feature suggestion, I'm not (necessarily) advocating that each property from an object should be listed in the PARAMETERS section of Get-Help for 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 →
                      • $? doesn't change in case of parsing error

                        1..5 | buggy_call
                        $?
                        The result is $False and this is expected

                        1..5 | $_
                        $?
                        The result is $True and this is not expected

                        This is frustrating for end users.
                        It's better to return $false in case of all errors.

                        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 →
                        • 11 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  ·  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.

                          • Compiling large number of DSC MOF files is slow

                            We use logic to dynamically compose a ConfigurationData structure and pass it to the configuration. This logic executes quickly. Calling the configuration generates more than 5,000 MOF files for unique nodes. The process takes 1.5 hours on modern server-class hardware with 16GB RAM. Also, the MOF files are all created at the end of the process, rather than one-at-a-time throughout the process. This causes high memory usage. Please optimize the PSDesiredStateConfiguration module to generate large quantities of MOF files more quickly. This issue adds significant delay to the DSC pipeline.

                            18 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

                              6 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                            • 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.

                              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

                                survey  ·  0 comments  ·  ISE and tooling  ·  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…

                                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

                                  investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                • Why is it still convoluted to see if Updates have been downloaded and are waiting to be installed?

                                  Like a lot of locations, updates for production servers are downloaded but not installed until reviewed. It is difficult to understand with all the automation Powershell tries to provide, it appears to be completely hands-off when it comes to updates? Why is that? Better, lets just get that fixed.

                                  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 →
                                  • 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

                                      1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Get-AuthenticodeSignature TimeStamperCertificate broken

                                      Problem:

                                      Get-AuthenticodeSignature does not return a time stamper certificate for files which have been time stamped with a valid time stamp server.

                                      Steps to reproduce:

                                      Using signtool.exe (from Windows SDK), view the signature info for signtool.exe. Verify that it has been time stamped, and that you can see the time stamper certificate.

                                      Using Get-AuthenticodeSignature, view the signature of signtool.exe. Notice that the TimeStamperCertificate field is blank.

                                      Consequences:

                                      Powershell will report any signed file as valid as long as the signature is valid, regardless of whether or not the timestamp is valid.

                                      Powershell version:
                                      Major Minor Build Revision
                                      ----- ----- -----…

                                      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 →
                                      • Include UTC timestamp as property to error object

                                        It'd be very helpful to attach a timestamp of when an error occured to an error object. Open to ideas as to whether it should be UTC, local time, ntp, etc.

                                        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  ·  PowerShell Engine  ·  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.

                                          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

                                            survey  ·  2 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base