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. snippets

    PowerShell ISE - Where are the default snippets after Win10 Upgrade?

    So I've upgraded to Win10Pro 1803 17134.1, opened my trusty PowerShell ISE, pressed CTRL+J and nothing happens!? Even the Get-ISESnippet is not showing any results. I'm using the default snippets and don't have any custom snippets under my documents / PowerShell folder.

    It seems to be related to OneDrive or Windows 10 update as both my Desktop and Laptop have the same problem.

    According to JRV the same issue occurs on 1809 builds.

    Link: https://social.technet.microsoft.com/Forums/en-US/47ded9fb-0501-4953-92cc-ef55dbf86fbe/powershell-ise-where-are-the-default-snippets-after-win10-upgrade?forum=winserverpowershell

    Best Regards,
    Glenn

    $PSVersionTable

    Name Value
    ---- -----
    PSVersion 5.1.17134.1
    PSEdition Desktop
    PSCompatibleVersions {1.0,…

    94 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

      20 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
    • Powershell ISE crashes on Ctrl+Space Intellisense

      my "Ideas" is Powershell ISE should not crash.

      https://github.com/PowerShell/PowerShell/issues/6846

      teps to reproduce
      Use Windows Powershell ISE on Windows Build 17134
      Enter the name of any cmdlet, a dash, then press ctrl+Space.
      Get-Help -[Ctrl+Space]
      Expected behavior
      Should show intellisense popup.
      Actual behavior
      Instead of an intellisense dropdown, a small dot appears.
      Messagebox as follows, followed by closing:
      ---------------------------
      Windows PowerShell ISE - Error
      ---------------------------
      An unexpected error has occurred, and Windows PowerShell ISE must close.
      ---------------------------
      OK
      ---------------------------
      Running in the visual studio debugger shows two exceptions, one from Xaml (associated with the appearance of the dot) the other a NullReferenceException…

      31 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

        10 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
      • ISE should not switch focus automatically to the console pane

        Starting from Windows 10 1803, when you run a selected block of code using F8, ISE switches focus to the console pane. This means that when you run several of these, you have to manually switch the focus back to the script pane after each execution.

        This is much more difficult than before, so please fix this.

        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

          0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
        • Powershell ISE win10 1803 Cursor swaping panes on run

          Since windows 10 1803 when running a script from the script pane, the cursor switches from the script pane to the console pane.

          To reproduce: Open powershell ise on windows 10 1803. Enter in a basic script (ex: Write-Host "test") and hit F5. The cursor will move to the console pane so if you start typing the output will be in the console pane.

          The expected behavior would be to leave the cursor in the script pane so that you can continue to edit the script. This was the behavior previous to windows 10 1803.

          5 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

            0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
          • Terminating error in if statement script block generates duplicate errorvariable entries

            Consider the following 2 functions (contrived to illustrate the issue).

            function 1error { [CmdletBinding()] Param(); throw "This produces 1" }
            function 2error { [CmdletBinding()] Param(); if($true) {throw "This produces 2"} }

            If you call the function 1error with an error variable, the error variable will act as expected.

            1error -ErrorVariable +1var
            $1var.count #results in 1

            If you call function 2error with an error variable, the error variable will have 2 identical errors.

            2error -ErrorVariable +2var
            $2var.count # results in 2

            PSVersion is 5.1.14393.2189

            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

              0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
            • 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 →
              • Inconsistent Array Initialization Behaviour

                Creating an array of arrays as below works well:

                $myArray = @(
                @(1,2,3),
                @(4,5,6)
                )
                $myArray[0] #outputs 1, 2, 3
                $myArray[1] #outputs 4, 5, 6

                $myBuggyArray = @(
                @(1,2,3)
                ,@(4,5,6)
                )
                $myBuggyArray[0] #outputs 1
                $myBuggyArray[3] #outputs 4, 5, 6

                I wouldn't expect the order of line break & comma to impact the behaviour of the command / can't find any documentation stating that it should.

                PSVersion: 5.1.14409.1012

                5 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

                  3 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                • CmdletsToExport publishing issue with large modules

                  We (the AWS PowerShell Tools team) have hit an issue publishing the AWS modules to the gallery involving a limit of 4000 cmdlets in the CmdletsToExport manifest member. The gallery returns an error when we attempt to publish, which has forced us to revert to using "*-*" in the manifest, which gives a degraded user experience. I inspected the gallery publishing cmdlets and could see no sign of the limit there, so am assuming therefore that this was a gallery-side exception. The limit appears to be isolated to the CmdletsToExport manifest member as we're able to publish the module with…

                  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

                    2 comments  ·  PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                  • Enable configuration version tracking for compiled DSC configurations

                    As a part of infrastructure as code or using DSC in the deployment pipelines, it is desired that we be able to identify the version of the node configuration. With all configurations being put into a source / version control repository, it won't be difficult to promote the version number for a given configuration document. However, at this point in time, there is no way to specify the version of the configuration document itself anywhere. This makes it hard to determine or identify what version of the configuration is being used on a target node without using a 3rd party…

                    29 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

                      2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                    • Windows 10 Build 17677 - Windows PowerShell lost cursor

                      Windows 10 Build 17677 latest in Windows PowerShell it lost cursor

                      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  ·  PowerShell Engine  ·  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 →
                        • PowerShell to select SSID

                          Many companies have several wifi ssids. You know, "Corp" "Guest" "Upstairs Lab"
                          Very very common.

                          How? How do you select one via PowerShell ?

                          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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                          • write-host -NoNewline parameter is ignored with powershell 5.1

                            Starting with WMF 5.0 and WMF 5.1 the -NoNewLine option for Write-Host is essentially ignored.

                            Simple example:
                            PS C:\> Write-Host "no newline test " -NoNewline

                            Current Behaviour:
                            no newline test
                            PS C:\>

                            Expected Behavior
                            no newline test PS C:\>

                            PS version Table is as follows.

                            Name Value
                            ---- -----
                            PSVersion 5.1.14409.1012
                            PSEdition Desktop
                            PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                            BuildVersion 10.0.14409.1012
                            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
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                              0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                            • BUG: Manage RDS certificates using powershell fails after WMF 5.1

                              Trying to manage Remote Desktop certificates using powershell after installing WMF 5.1 on Windows Server 2012 fails with the following error message:
                              PS C:\Users\MyUser> Import-Module RemoteDesktop
                              PS C:\Users\MyUser> Set-RDCertificate -Role RDWebAccess

                              Get-Server : The term 'Get-Server' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
                              path was included, verify that the path is correct and try again.
                              At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\Certificate.psm1:304 char:22
                              + $webaccess = Get-Server -ConnectionBroker $ConnectionBroker - ...
                              + ~~~~~~~~~~
                              + CategoryInfo : ObjectNotFound: (Get-Server:String) [], CommandNotFoundException
                              + FullyQualifiedErrorId : CommandNotFoundException

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

                                Switch should allow for implied breaks.

                                I think it would be useful, if it doesn’t exist to have an additional option, e.g.

                                switch -ImplyBreak ($variable) {
                                ‘red’ { ‘r’ }
                                ‘green’ { ‘g’ }
                                }

                                Where -ImplyBreak would make the code above equivalent to:

                                switch ($variable) {
                                ‘red’ { ‘r’; break }
                                ‘green’ { ‘g’; break }
                                }

                                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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                • Add support for SSRS Mobile reports to Out-RsFolderContent

                                  Out-RsfolderContent fails when exporting Mobile Reports because the 'TypeName' MobileReport is not covered in the function.

                                  I added the following remedy to my system. may be nice for others.
                                  I have not yet tested for PowerBI reports ... but neither have the people making these nice modules ...

                                  if (($item.TypeName -eq 'MobileReport') ) {
                                  $relativePath = $item.Path
                                  if($RsFolder -ne "/") { $relativePath = Clear-Substring -string $relativePath -substring $RsFolder -position front }
                                  $relativePath = $relativePath.Replace("/", "\")
                                  $newFolder = $Destination + $relativePath
                                  Write-Verbose "Creating folder $newFolder"
                                  New-Item $newFolder -ItemType Directory -Force | Out-Null
                                  Write-Verbose "Folder: $newFolder was created successfully."
                                  }

                                  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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Please modify clause ($var -in 1..3)

                                    Please modify clause ($var -in 1..3) not to use a list in memory.

                                    The code becomes unusable when using long ranges like 1..20000000

                                    Thanks

                                    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  ·  PowerShell Engine  ·  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 →
                                      • Powershell write-progress memory leak in remote sessions

                                        Hello, I have noticed some strange behavior with Powershell when run in a remote session, it seems as if there is a memory leak with write-progress when run in a remote session.

                                        Take the following code for example:

                                        $MaxVal = 10000000

                                        for ($x=1;$x -le $MaxVal;$x++)
                                        {
                                        Write-Progress -Activity "Writing a progress event" -PercentComplete ($x / $MaxVal * 100) -Status "$($x / $MaxVal * 100)% complete"
                                        }

                                        If I run this locally, powershell.exe runs normally and does not take up much memory.

                                        However, if I run it on the same computer from a remote session (as in, I do an enter-psesssion…

                                        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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                        • At line:4 char:1 + Import-DscResource -ModuleName cNtfsAccessControl + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Could not find the

                                          Can you provide solution for this error.
                                          I am getting it even after i downloaded NTFS security files.

                                          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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 68 69
                                          • Don't see your idea?

                                          Feedback and Knowledge Base