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. New Verb: Demo

    Demo (verb), 'demonstrate the capabilities of (software or equipment).' Another verb to flag that the function/cmdlet is not for production but will demonstrate a key knowledge item, technique, or concept. Where the suggestion for the verb Proto has to do with the (rapid) development path, this would fill a need in training or maintaining on-going knowledge of the language. It's a great suggestion, please up-vote!

    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 →
    • 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 →
                          • 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 →
                            • 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 →
                                  • Does sqlps need to be imported for PS vers 4.0

                                    In PS 3.0, it was known to have to do an Import-Module sqlps -DisableNameChecking command in order to get the SQL SMO CMDLETS for working with SQL Server. Is this still needed for PS 4.0? There doesn't seem to be any Documentation on this difference.

                                    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 →
                                    • Add enhanced reporting, allowing you to view the status of all nodes instead of one at a time.

                                      Currently, the DSC reporting server only offers the ability to query a single node at a time. I think for any environment, it would be crucial to get a list of the last reported compliance for all nodes. I'd really like to see this feature added in a future release.

                                      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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Support for Query Language CQL lacks documentation: CIM_QueryCapabilities missing

                                        The Get-Ciminstance -QueryDialect parameter accepts CQL
                                        https://technet.microsoft.com/en-us/itpro/powershell/windows/cimcmdlets/get-ciminstance#-querydialect
                                        Official tutorials
                                        http://www.wbemsolutions.com/tutorials/DMTF/wbem-cql.html
                                        and specifications say the standard class CIM_QueryCapabilities reveals the features supported by the CQL implementation.
                                        However, this class is missing, and documentation is not to be found.
                                        Would Microsoft care to spare us the mystery?

                                        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 →
                                        • ResourceUriSessionSet of Get-CimInstance doesn't filter

                                          Observe this sample output: same -Filter, different results.
                                          Equal parity for general CIM would be nice.

                                          > Get-CimInstance -ResourceUri http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_LogicalDisk -Filter "DeviceID='D:'" -KeyOnly -CimSession $cs | % { '{{{0}}}' -f $_.DeviceId }
                                          {C:}
                                          {D:}
                                          > Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceID='D:'" -KeyOnly -CimSession $cs | % { '{{{0}}}' -f $_.DeviceId }
                                          {D:}
                                          > $PSVersionTable

                                          Name Value
                                          ---- -----
                                          PSVersion 5.1.14393.1066
                                          PSEdition Desktop
                                          PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                                          BuildVersion 10.0.14393.1066
                                          CLRVersion 4.0.30319.42000
                                          WSManStackVersion 3.0
                                          PSRemotingProtocolVersion 2.3
                                          SerializationVersion 1.1.0.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

                                            0 comments  ·  WMI  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base