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. "Using module" statement does not reload module after changes are made

    Problem Description
    ------------------
    If you are using the `using module` statement, it will load the module without any issues. However, if you make a change to the module and run the `using module` statement again without restarting your PowerShell session, it will not load the new modified module into memory, and instead will continue to use the old existing module that was loaded. This makes doing development with `using module` statements very tedious as you must continually reload your PowerShell session whenever you make changes to the module.

    Ideally we would just use `Import-Module -Name [module name] -Force` to avoid…

    21 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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    • Remote Invoke-Command with -ScriptBlock changes types of arguments if scripblock contains variables

      What's going on here???

      PS C:\> Invoke-Command -ComputerName somemachine -Credential $cred -ArgumentList {Write-Host hi} -ScriptBlock {param($sb); Write-Host $sb.GetType().Name}
      ScriptBlock
      PS C:\> Invoke-Command -ComputerName somemachine -Credential $cred -ArgumentList {Write-Host hi} -ScriptBlock {param($sb); Write-Host $sb.GetType().Name; $a=3}
      String
      PS C:\> Invoke-Command -ComputerName somemachine -Credential $cred -ArgumentList {Get-ChildItem} -ScriptBlock {param($sb); Write-Host $sb.GetType().Name}
      ScriptBlock
      PS C:\> Invoke-Command -ComputerName somemachine -Credential $cred -ArgumentList {Get-ChildItem} -ScriptBlock {param($sb); Write-Host $sb.GetType().Name; $a=3}
      String

      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

        5 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
      • BUG: Shell crashing with x509Certificate2 objects

        Problem:

        When creating an object from the x509Certificate class the shell adds 3 script properties:

        DnsNameList
        EnhancedKeyUsageList
        SendAsTrustedIssuer

        The SendAsTrustedIssuer property causes Powershell to hit a CLR exception and hard crash when accessed.

        Repro Code:

        * Note: do this in a fresh session as it will crash the session

        $Test = New-Object System.Security.Cryptography.x509Certificates.x509Certificate2
        $Test | select *

        Alternately,

        $Test = New-Object System.Security.Cryptography.x509Certificates.x509Certificate2
        $Test.SendAsTrustedIssuer

        Crash dump:

        Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
        at System.Management.Automation.Security.NativeMethods.CertGetCertificateContextProperty(IntPtr pCertContext, CertPropertyId dwPropId, IntPtr pvData, Int32& pcbData)
        at Microsoft.PowerShell.Commands.SendAsTrustedIssuerProperty.ReadSendAsTrustedIssuerProperty(X509Certificate2 cert)
        at CallSite.Target(Closure ,…

        3 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 →
        • Move-AzureRmDataLakeStoreItem not working in newer versions of module

          I created a runbook on several automation accounts that move around files and folders on Datalake Storage Accounts (gen 1). The runbook works without hitches on 2 automation accounts, but did not work on the other 2.

          There were quite a few differences in the versions of the added modules: the runbook worked on the older versions of the modules, but not the newer. Specifically the cmdlet Move-AzureRmDataLakeStoreItem threw an error on the newer versions:
          "Account name ***.azuredatalakestore.net/ is invalid. Specify the full account including the domain name."

          After trying quite a few iterations of writing the account name (just…

          2 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 →
          • && and || operators for conditional execution

            Add these essential operators that are an integral part of any other command line language (CMD, Bash, etc.)

            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 →
            • Private methods in powershell class's don't work

              For reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/class_newtype#methods

              Creating private methods following the documentation does not work. To reproduce follow the following steps:

              * Open Powershell or the ISE
              * Copy the code from microsoft documentation
              * if ISE: The interface will alarm indicating problems
              * Execute documented test code
              * Observe several errors complaining about code syntax and missing brackets.

              You can also repro by adding the private designation to any working method of an existing class and it will bomb.

              2 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 →
              • SMTPEventConsumer doesnt format message body properly

                I found a bug in PS 4.0 when working with SMTPEventConsumers. The bug I found truncated the string used for the "Message" property of the SMTPEventConsumer. The code truncated anything after the first 16 characters. It didn't matter what I used for an escape sequence, formatted as here string, nothing worked. I ran the exact same code on a PS 5.1 host and the SMTP message was formatted exactly as expected. For more indepth info I have included a link to the thread I started on TechNet for this issue.

                https://social.technet.microsoft.com/Forums/en-US/62c4552b-b5e8-4bf3-ac74-6c5f1668af9f/issues-properly-formatting-smtpeventconsumer-message-body-in-powershell?forum=ITCG

                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 →
                • Transfer $DebugPreference and $VerbosePreference to New-PSSession

                  I want a PSSessionOption that says to transfer over common applicable session level variables over to the remote session, specifically $DebugPreference and $VerbosePreference.
                  $DebugPreference = 'continue'
                  $PSSession = New-PSSession -ComputerName 'localhost'
                  Write-Debug $DebugPreference # Writes 'continue'
                  Invoke-Command -ScriptBlock {Write-Debug $DebugPreference} -Session $PSSession # Writes nothing

                  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 →
                  • ERROR: Select-Object with -First parameter populates -ErrorVariable even if there was no error

                    If you run: 1..2 | select -ErrorVariable a
                    then $a is empty - OK.

                    If you run: 1..2 | select -First 2 -ErrorVariable a
                    then in $a is "System error"

                    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 →
                    • Merge "Windows PowerShell" and "PowerShell Core", make result default on Windows

                      When sending code to someone, I don't want to have to qualify the post with "if it doesn't work, try the *other* PowerShell...". I know there will be OS-specific modules/commands, but there should *not* be two code bases for the shell itself, or two product names.

                      8 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 →
                      • Remote powershell should not return error for FileSystem validation

                        SCENARIO
                        On Machine1:
                        SCHTASKS /Create /RU SYSTEM /SC ONSTART /TN "Map I drive" /TR "net use I: \\someServer\someShare somePassword /user:someDomain\someUser"

                        On Machine2 run:
                        $Script = { Write-Output "Hello world!" }
                        Invoke-Command -ComputerName Machine1 -ScriptBlock $Script

                        As a result you get "Hello world!" but also an error
                        "Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed."

                        The error belongs to I drive which should have been returned as a warning and not error. The invoke does not even use the I drive so why fail on it (we in this case dont even want the invoke to have access…

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

                          2 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 →
                          • Add ExportTo-Markdown

                            Hi

                            Using Markdown is common nowadays in VCS tools like Git for readme files.

                            Plus it's handy to get a tabular strcture for better visibility.

                            Example use cases:
                            - Get-Process output comparison at different dates and time
                            - SQL query results in tabular form with column names as headers

                            So it'd be someInput|ExportTo-MarkDown

                            2 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 →
                            • Write-Host -NoNewLine and Transcription

                              Starting with WMF 5.0 the -NoNewLine option for Write-Host is essentially ignored in the transcripts created using Start-Transcript.

                              Simple example script:

                              Start-Transcript log.txt
                              Write-Host -NoNewLine "this should all"
                              Write-Host -NoNewLine "be on one line"
                              Write-Host -NoNewLine "in the log.txt file"
                              Stop-Transcript

                              12 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 →
                              • Get-Service should return the user account the services are running under

                                The Get-Service cmdlet should return the service account associated to each service.

                                We can get this information easily from the Win32_Service WMI class, but to me, it should be returned by Get-Service.

                                Checked with PS v5 without luck...

                                Thanks!

                                169 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

                                  7 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                • Out of the box support for YAML like csv / xml / json

                                  Votes from Connect: 25

                                  Original Date Submitted: 4/16/2015 7:34:07 PM

                                  Description:
                                  ********Contact Information********
                                  Handle: ducke
                                  Site Name: PowerShell
                                  Feedback ID: 1252364
                                  ***************************************

                                  Problem Description:
                                  In the "DevOps" world, YAML is a first class citizien in products like Kitchen CI, Elasticsearch, Appveyor, Travis CI, rubocop etc.
                                  It would be great to have commands similar to https://github.com/dfinke/PowerYaml native without the need to import a module.

                                  Product Studio item created by Connect Synchronizer due to creation of feedback ID 1252364 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1252364).

                                  Repro Steps:

                                  Internal BugId: 14385

                                  65 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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                  • new parameter -markdown for Format-Table

                                    Example:

                                    $Get-Process | select -First 5 | ft -au

                                    Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
                                    ------- ------ ----- ----- ----- ------ -- -----------
                                    716 47 32832 43396 587 1764 AdminManagerClient
                                    257 34 3432 9352 84 1128 AgentService
                                    495 78 15700 28528 154 3744 AppVClient
                                    244 35 60952 41796 692 0.56 5416 AppVStreamingUX
                                    591 18 17280 22992 108 1,751.98 4672 audiodg

                                    $Get-Process | select -First 5 | ft -markdown

                                    |Handles|NPM(K)|PM(K)|WS(K)|VM(M)| CPU(s)| Id|ProcessName |
                                    |-------|------|-----|-----|-----|--------|----|------------------|
                                    | 716| 47|32832|43396| 587| |1764|AdminManagerClient|
                                    | 257| 34| 3432| 9352| 84| |1128|AgentService |
                                    | 495| 78|15700|28528| 154| |3744|AppVClient |
                                    | 244| 35|60952|41796| 692| 0.56|5416|AppVStreamingUX | …

                                    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

                                      survey  ·  1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                    • invoke-webrequest hangs/freeze at many websites

                                      Powershell 4.0 / IE 11

                                      Works:
                                      invoke-webrequest "http://www.google.de"
                                      GET http://www.google.de with 0-byte payload
                                      received 189489-byte response ...
                                      - Result: Microsoft.Powershell.Commands.HtmlWebResponseObject

                                      Works not:
                                      invoke-webrequest "http://www.heise.de"
                                      GET http://www.heise.de with 0-byte payload
                                      received 179789-byte response ...
                                      hangs, no success, no result

                                      invoke-webrequest "http://windows.microsoft.com/en-US/windows-8/system-requirements"
                                      GET http://windows.microsoft.com/en-US/windows-8/system-requirements with 0-byte payload
                                      received 91075-byte response ...
                                      hangs, no success, no result

                                      the same with -UseBasicParsing

                                      16 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

                                        4 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Bug in WMF5 with inaccessible network path in PSModulePath environment variable

                                        In WMF5, if the PSModulePath environment variable has a UNC Path in it that is currently inaccessible, powershell fails to load many built-in modules.

                                        For instance, if PSModulePath looks like this:

                                        C:\Users\jmmurrah\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;\\badservername\folder

                                        When powershell loads and times out trying to access the path, many standard cmdlets are not found; get-host, test-path, format-list, etc.

                                        Get-member -listavailable reports back the modules, but does not list their path on disk, and many of them have no exported commands. When trying to import one of these modules powershell reports an error that the module path cannot be found.

                                        This doesn't appear to happen…

                                        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

                                          2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                        • PowerShell 5 - bug in GetType() for COM objects IADSUser

                                          Votes from Connect: 9

                                          Original Date Submitted: 6/16/2015 3:12:31 AM

                                          Description:
                                          ********Contact Information********
                                          Handle: Ondrej Sevecek
                                          Site Name: PowerShell
                                          Feedback ID: 1437366
                                          ***************************************

                                          Frequency: PowerShell
                                          Regression: run the mentioned script on Windows 10.0.10074 in its built-in PowerShell 5.

                                          Problem Description:
                                          When I run the following on Windows 10.0.10074 in PowerShell 5, it does not work for user members of the local group:

                                          $admins = [ADSI] 'WinNT://./Administrators,group'

                                          foreach ($oneMember in $admins.Members()) {

                                          $oneMemberName = $oneMember.GetType().InvokeMember('Name', 'GetProperty', $null, $oneMember, $null)
                                          Write-Host $oneMemberName

                                          }

                                          The error is: Error while invoking GetType. Could not find member.

                                          While the code works fine on any other…

                                          15 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 →
                                          ← Previous 1 3 4 5 20 21
                                          • Don't see your idea?

                                          Feedback and Knowledge Base