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 new default cmdlet parameters?

    We have -ErrorVariable and -WarningVariable. To capture verbose output to a variable, you can $VerboseRecords = (Write-Verbose -Verbose "test") 4>&1 # and find it in $VerboseRecords.Message, but wouldn't it make sense to add a -VerboseVariable? Maybe even a -WriteHostVariable?

    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

      2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    • [Bug] Bitwise AND operation on long value is ignored when Most-Significant 32 bits is masked with zero

      [Bug] Bitwise AND operation on long value is ignored when Most-Significant 32 bits is masked with zero

      Sample Code to replicate issue:

      [BitConverter]::GetBytes([BitConverter]::ToInt64(@(1,1,168,192,255,255,255,255), 0) -band 0x00000000ffffffff)

      Should return: @(1,1,168,192,0,0,0,0)
      Actually returns : @(1,1,168,192,255,255,255,255)

      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 →
      • BUG: PowerShell stderr redirect to file inserts newlines

        If I run the following command in PowerShell:

        $ .\long_error_message.exe 2>error.txt

        , I get spurious newlines in error.txt. I generated a full repro and extremely clumsy solution at [1]. Can we declare this behavior as a bug? Note that cmd.exe operates exactly as one would expect.

        [1] https://stackoverflow.com/questions/48655624/powershell-stderr-redirect-to-file-inserts-newlines

        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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
        • copy-item progress

          Add an optional switch to show the progress of an ongoing copy operation. Could be useful for large operation. Basically replicate as much information as the Explorer does, without the performance graph.

          9 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 →
          • Implement `runas.exe` counterpart with `netonly` and `NoNewWindow` switches

            I need to open Powershell console (within the same window) as different user with /netonly option known from the runas.exe command. I would like to avoid typing manually passwords, because I will use this console to run some scripts automatically.

            As far as I know if it currently impossible.
            I added appropriate question on SO: https://stackoverflow.com/questions/48882958/powershell-open-new-console-as-different-user-in-the-same-window-runas-neto

            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: The certificate for the WMF 5.1 setup has expired WMF 5.1 cannot be installed

              The certificate for Win7AndW2K8R2-KB3191566-x64.msu has expire and installing WMF 5.1 fails with the following error in Event Log/Windows Logs/Setup

              Windows update "Update for Windows (KB3191566)" could not be installed because of error 2148204801 "A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file." (Command line: ""C:\Windows\system32\wusa.exe" "C:\Users\username\Downloads\Win7AndW2K8R2-KB3191566-x64\Win7AndW2K8R2-KB3191566-x64.msu" ")

              Is WMF 5.1 still supported?

              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 →
              • Add-Content should create folder but returns error

                According to this documentation Add-Content should create a folder when it does not exist: "This command creates a new directory and file and copies the content of an existing file to the newly created file."

                https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-content?view=powershell-5.1

                However, I get an error: "Add-Content : Could not find a part of the path 'C:\tests\test134\logs\test134.log'."

                Seems like a clear issue to me. Either in the documentation or the functionality.

                BR Matthias

                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 →
                • Transcript does not log the Verbose and Warning stream of Receive-Job

                  Problem
                  ------------------------------------------------------
                  When we run a job inside a transcript, the Verbose and the Warning streams of the jobs are not displayed in the transcript. However, we can see the in the console correctly.

                  Steps to reproduce
                  --------------------------------------------
                  Run the following script
                  Start-Transcript -Path 'C:\Logs\DemoJobsTranscriptOutput.txt' -Append | Out-Null

                  $VerbosePreference = "continue"
                  $WarningPreference = "continue"

                  $jobs = @()

                  $jobs += Start-Job -ScriptBlock {
                  $VerbosePreference = "continue"
                  $WarningPreference = "continue"
                  "Begin job"
                  Write-Verbose "Verbose!"
                  Write-Warning "Warning!"
                  "End job"
                  } -Name "Demo"

                  $jobs | Wait-Job | Out-Null

                  $jobs | % {
                  "Result for job '$($_.Name)'"
                  $_ | Receive-Job -Verbose
                  }

                  $jobs | Remove-Job…

                  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 →
                  • log2(45/120) * 2 should be interpreted as (log2(45/120)) * 2

                    Given a function:
                    function log2 {param ([double]$x) [Math]::Log($x) / [Math]::Log(2) }

                    Expected: log2(45/120) * 2 is interpreted as (log2(45/120)) * 2 and yields -2.83007499856

                    Actual: log2(45/120) * 2 equals log2(45/120) and yields -1,41503749927884

                    (log2(1/2) * 3) -eq (log2(1/2)) yields True - it doesn't make sense.

                    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 →
                    • Powershell Core on IBM Power-series Hardware

                      With Powershell Core v6 in GA status, it would be nice to see it scaled to other architecture, including OpenPOWER (This would include IBM's Power8 and the more recent Power9 hardware). This would allow management of OSes on that hardware with Powershell Core.

                      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 →
                      • Alias $PSVersionTable.PSVersion to a sensible command

                        Determining the version of powershell requires the memorization of this silly, circuitous command: $PSVersionTable.PSVersion

                        Can we please alias this to something more rational. I'm tired of googling "powershell version command" every time I forget the name of the table.

                        It would be much better to have something guessable like:

                        powershell --version

                        or

                        help version

                        etc.

                        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 →
                        • log2 45/120 should be valid syntax

                          Given a function:
                          function log2 {param ([double]$x) [Math]::Log($x) / [Math]::Log(2) }
                          Expected: log2 45/120 should yield -1.41503749928
                          Actual:
                          log2 : Cannot process argument transformation on parameter 'x'. Cannot convert value "45/120" to type "System.Double".
                          Error: "Input string was not in a correct format."
                          At line:1 char:6
                          + log2 45/120
                          + ~~~~~~
                          + CategoryInfo : InvalidData: (:) [log2], ParameterBindingArgumentTransformationException
                          + FullyQualifiedErrorId : ParameterArgumentTransformationError,log2

                          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 →
                          • Bug: ExecutionPolicy not in effect for network drives

                            I have downloaded a script from the Internet. Under the current "RemoteSigned" execution policy, this script should not run. But, it does run. Why is that?

                            https://gallery.technet.microsoft.com/scriptcenter/Get-Type-Get-exported-fee19cf7
                            Windows knows it is from the Internet because of the Zone.Identifier ADS.

                            PS H:\src\test> Get-Item .\Get-Type.ps1 -Stream *

                            PSPath : Microsoft.PowerShell.Core\FileSystem::H:\src\test\Get-Type.ps1::$DATA
                            PSParentPath : Microsoft.PowerShell.Core\FileSystem::H:\src\test
                            PSChildName : Get-Type.ps1::$DATA
                            PSDrive : H
                            PSProvider : Microsoft.PowerShell.Core\FileSystem
                            PSIsContainer : False
                            FileName : H:\src\test\Get-Type.ps1
                            Stream : :$DATA
                            Length : 4631

                            PSPath : Microsoft.PowerShell.Core\FileSystem::H:\src\test\Get-Type.ps1:Zone.Identifier
                            PSParentPath : Microsoft.PowerShell.Core\FileSystem::H:\src\test
                            PSChildName : Get-Type.ps1:Zone.Identifier
                            PSDrive : H
                            PSProvider : Microsoft.PowerShell.Core\FileSystem
                            PSIsContainer : False
                            FileName : H:\src\test\Get-Type.ps1
                            Stream : Zone.Identifier
                            Length : 26

                            PS…

                            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 →
                            • [Suggestion] Include Universal Dashboard features

                              How about include in PowerShell Engine, the excellent features of Universal Dashboard by Adam Driscoll ?

                              - Design of web dashboard using Powershell cmdlets
                              - REST API exposure using Powershell cmdlets

                              https://www.powershellgallery.com/packages/UniversalDashboard/
                              https://poshtools.com/powershell-universal-dashboard/

                              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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                              • Bug: Slow function when setting a parameter to Mandatory and specifying its Type

                                There is a bug that causes a function to be called much more slowly than it should if an array parameter has both Mandatory and Type specified. I'm guessing something is causing the system to iterate through the array, so the larger the array, the longer to call the function.

                                With both Mandatory and Type specified, it takes a whole second to call a function with a 10MB byte array. If a 1byte array is used, it takes less than a millisecond to call the function. If only one, the other, or neither are specified, then it takes less than…

                                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 →
                                • Move-Item's -Verbose causes $ErrorActionPreference to be ignored

                                  Move-Items's -Verbose parameter causes the global $ErrorActionPreference = "Stop" to be ignored. This is a bug. Here's a repro script:

                                  BugRepro.ps1:

                                  $ErrorActionPreference = "Stop"
                                  Write-Host "ErrorActionPreference is $ErrorActionPreference"
                                  mkdir folder -ErrorAction SilentlyContinue | Out-Null
                                  "" > a.txt
                                  Copy-Item a.txt folder
                                  Write-Host "About to trigger error"
                                  Move-Item a.txt folder -Verbose | Out-Null
                                  Write-Host "If you're reading this, then execution didn't stop!"
                                  Write-Host "Remove the Verbose paramter and it does stop, like it should."

                                  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 →
                                  • PS history file (ConsoleHost_history.txt) should include a timestamp

                                    In bash, there are tricks to include the time when a command was executed (https://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/)
                                    It would be cool to include a timestamp in PS history too

                                    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 →
                                    • PowerShell StackOverFlowException: get-childitem -path HKLM:\ -recurse -include *Windows*

                                      PowerShell has a bug in it which causes a "StackOverFlowException" when running the following command:
                                      get-childitem -path HKLM:\ -recurse -include *Windows*

                                      It was originally reproduced while looking for something different than:
                                      Windows

                                      This is consistently reproducible in latest updates applied of Windows 10 x64 Business and Home, with both PowerShell.exe, and ISE, x86 and standard.

                                      $PSVersionTable.PSVersion

                                      Major Minor Build Revision
                                      ----- ----- ----- --------
                                      5 1 16299 98

                                      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 →
                                      • Fix LoadDefaultTypesFiles when using out of process runspace

                                        Fix for "Object reference not set to an instance of an object." when using LoadDefaultTypeFiles() with out of process runspace

                                        Reproduce:
                                        TypeTable.LoadDefaultTypeFiles()

                                        Reproduce underlying cause:
                                        Copy C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml to another name and run:
                                        var typeTable = new TypeTable(new List<string> { @"C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types-debug.ps1xml" });
                                        Console.WriteLine(typeTable);

                                        The error is:
                                        "There were errors loading TypeTable. Look in the Errors property to get detailed error messages."
                                        , C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types-debug.ps1xml(3003) : Error in type "System.Security.AccessControl.ObjectSecurity": The "Type" node must have "Members", "TypeConverters", or "TypeAdapters".
                                        , C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types-debug.ps1xml(3036) : Error: CodeProperty should use a getter or setter method.
                                        , C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types-debug.ps1xml(3037) : Error: Unable to find type [Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase].
                                        , C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types-debug.ps1xml(3029) :…

                                        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 →
                                        • Mandatory parameters value is not accessible in DynamicParam block if the value to the parameter is given when prompted.

                                          Parameter value from param block is not available in DynamicParam block if not passed while calling the function/Script. Here if I set the parameter in param block as it as mandatory the script/function will prompt for the input and the input given is not available in DynamicParam block.

                                          https://social.technet.microsoft.com/Forums/en-US/637bcff2-ab98-4ead-a036-38e7eb94a261/dynamicparams-with-mandatory-parameters?forum=winserverpowershell

                                          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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 18 19
                                          • Don't see your idea?

                                          Feedback and Knowledge Base