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

      41 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

        8 comments  ·  ISE and tooling  ·  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: Powershell Get-Help does not work with Exchange Online cmdlets

          We've been lucky, from what I'm gathering from web searches! Until December last year, Exchange Online Powershell cmdlet help was available using Get-Help in the shell. However, after the Christmas break, the only response we get is:

          Get-Help : Exception calling "Invoke" with "0" argument(s): "Cannot find path '' because it does
          not exist."
          At line:1 char:1
          + Get-Help Get-Mailbox
          + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo : NotSpecified: (:) [Get-Help], MethodInvocationException
          + FullyQualifiedErrorId : CmdletInvocationException

          It's the same issue irrespective of the cmdlet.

          Consequently, I'm forced to contend with painful searches of the documentation website for information of the relevant cmdlets.

          Raised…

          6 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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
          • Import-json

            json is becoming the new standard (if not already)
            It would be nice to have an import-json and a export-json as we have in xml/csv instead of the two steps process with get-content and convertfrom-json and convertto-json.

            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  ·  Microsoft.PowerShell.* Modules  ·  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.

              30 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

                5 comments  ·  ISE and tooling  ·  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 →
                • Get-ChildItem -LiteralPath doesn't support long path

                  Get-ChildItem -LiteralPath doesn't support long path, for example:

                  Get-ChildItem -LiteralPath 'D:\aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjjkkkkkkkkkkllllllllllmmmmmmmmmmnnnnnnnnnnooooooooooppppppppppqqqqqqqqqqrrrrrrrrrrssssssssssttttttttttuuuuuuuuuuvvvvvvvvvvwwwwwwwwwwxxxxxxxxxxyyyyyyyyyyzzzzzzzzzz.txt'

                  Which path is longer than 260 bytes, even if the file DO exists in that path.

                  But `Get-ChildItem` WITHOUT `-LiteralPath` works well with that long-path file.

                  $PSVersionTable

                  Name Value
                  ---- -----
                  PSVersion 5.1.17763.134
                  PSEdition Desktop
                  PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                  BuildVersion 10.0.17763.134
                  CLRVersion 4.0.30319.42000
                  WSManStackVersion 3.0
                  PSRemotingProtocolVersion 2.3
                  SerializationVersion 1.1.0.1

                  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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                  • Missing newer computer account in Get-LocalUser on a DC

                    in PowerShell 5.1.14393.2608 when I run Get-LocalUser * on a Windows Server 2016 Domain Controller I should get a list of all domain user and computer. But the newest Domain joined computer is missing.
                    Please fix this.
                    Also when I run Get-LocalUser MyComputer$ and MyComputer is the last domain joined computer I get ObjectNotFound

                    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

                      1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                    • Bug: Ps1 script file with extra extension gets deleted when called from CMD

                      When calling PowerShell from CMD and specifying a script file that contains an extra "extension" (extra dot) in the base name, the script is not run but the file is mysteriously deleted:

                      Example (run in CMD):

                      powershell -file c:\temp\script.txt.ps1

                      The same issue when called like this:

                      powershell -command "& c:\temp\script.txt.ps1"

                      This has been reproduced by me and others on different machines with different paths.

                      The same issue exists when called from inside PowerShell like this:

                      . "powershell.exe" -file c:\temp\script.txt.ps1
                      Start-Process "powershell" -Arg "-file, "c:\temp\script.txt.ps1"

                      Note that these will work just fine:

                      powershell -command "& 'c:\temp\script.txt.ps1'"
                      powershell -command ";& c:\temp\script.txt.ps1"
                      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

                        1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                      • "Test-NetConnection" add timeout

                        please add timeout to "Test-NetConnection" see https://superuser.com/q/805621/216033

                        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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                        • high CPU

                          Found out when my CPU is high (99%-100) (i do set executionpolicy to remotesign/unrestricted also)
                          When i run the PS script, it will ask for executionpolicy.
                          but when i low CPU, it will just run the script.

                          suspect value (executionpolicy remotesign) unable to pass thru to script.ps1 on time. so it prompt out everytime when CPU is high.
                          do we have some setting to tune this. delay it, so that executionpolicy have more time to pass the value to script.ps1.

                          ---------------------------------
                          Script:
                          $sourcefolder="D:\A743"
                          $datenow = get-date
                          $processdate = (get-date).Adddays(-3)

                          get-childitem $sourcefolder -file | where-object { $_.lastwritetime -le $processdate } |…

                          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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                          • How to create external trust relationships between two domains?

                            How to create external trust relationships between two domains, such as aaa.com and bbb.com. I haven't seen a similar demo for two days.
                            Looking forward to your reply.

                            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

                              1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                            • Get-Help NOTES section identation issue

                              When we run get-help on cmdlet which has .NOTES the output is unusually indented, even though there is no tab in function documentation.

                              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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                              • Get-RDRemoteApp truncates the Alias name with ...

                                list entire alias or provide option for column widths>

                                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 →
                                • [BUG] Start-Process might not return Handle/ExitCode

                                  Issue:
                                  In order to obtain the Exit Code from a Process we are executing the Start-Process cmdlet with the following parameters:
                                  -PassThru -Wait -WindowStyle Hidden
                                  or
                                  -PassThru -Wait -NoNewWindow

                                  In rare cases, this leads to the following exception:
                                  System.Management.Automation.CmdletInvocationException: Cannot process request because the process (<ProcessIdHere>) has exited. ---> System.InvalidOperationException: Cannot process request because the process (<ProcessIdHere>) has exited.
                                  at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
                                  at System.Diagnostics.Process.OpenProcessHandle(Int32 access)
                                  at System.Diagnostics.Process.get_Handle()

                                  After the Exception occurred, the returned Object does not contain a Handle nor Exit Code but the executable itself executed without issue.

                                  We also tried to remove the “-Wait” Parameter and…

                                  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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Bug in Import-StartLayout cmdlet

                                    The documentation states to import a .xml to a mounted Windows image, you can use the powershell command:
                                    PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"

                                    This will generate an error. You cannot end -MountPath with a '' character, if you do, PowerShell throws the error:
                                    Import-StartLayout : The path B:\WIMs\Test\ did not resolve to a file.

                                    If you format the command:
                                    PS C:\ Import-StartLayout -LayoutPath "Layout.xml" -MountPath "E:\MountedImage"
                                    You will receive the following error:
                                    Import-StartLayout : Could not find a part of the path
                                    'E:\MountedImageUsers\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml'.
                                    Note the missing '\' character between "MountedImage" and "Users"
                                    This appears to be an error…

                                    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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                                    • We need: Get-VpnConnectionRoute

                                      How do we list routes added with Add-VpnConnectionRoute?
                                      We need a Get-VpnConnectionRoute!

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

                                          Feedback and Knowledge Base