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. BUG: Get-RDSessionCollection always generates exception on Windows Server 2019

    Get-RDSessionCollection of the RemoteDesktop module always throws an exception:
    --

    PS C:\windows\system32> Get-RDSessionCollection
    New-Object : Exception calling ".ctor" with "1" argument(s): "Invalid parameter "
    At C:\windows\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1:520 char:14
    + ... $scope = New-Object System.Management.ManagementScope("\\" + $Conn ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

    CollectionName Size ResourceType CollectionType CollectionDescription
    -------------- ---- ------------ -------------- ---------------------
    mycollection 0 RemoteApp programs PooledUnmanaged My first collection

    PS C:\windows\system32>

    --

    Changing C:\Windows\System32\WindowsPowerShell\v1.0\Modules\RemoteDesktop\SessionDesktopCollection.psm1 line 520

    $scope = New-Object System.Management.ManagementScope("\\" + $ConnectionBroker + "\" + $wmiNamespace, $connectionOptions)

    into

    $msuri = "\\" + $ConnectionBroker + "\" + $wmiNamespace
    $scope = New-Object System.Management.ManagementScope($msuri, $connectionOptions)

    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 →
    • Broken or Incorrect Powershell on Windows 10

      So I have Windows 10, in Windows optionalFeatures.exe Powershell is marked as version 2.0 in windows system32 is it version 1.0 and Windows Powershell HOST command says Version 5.1

      Despite the above information, my Powershell does not know how to do any commands such as 'install-module' or 'PSVerstonTable'
      I have a suspicion that my Powershell is somehow corrupted or the incorrect version that was manually installed previously.

      I have turned Windows PowerShell 2.0 OFF in Windows Features but Powershell remains and I can open and access it.

      I have looked for guides and help on how to do a clean…

      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 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…

        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 →
        • Add a -BreakawayFromJob parameter to the Start-Process cmdlet

          When you create a process with Start-Process, it joins the same Windows Job as the PowerShell session. There are times when you want to create a process that is in a new Windows Job. The CreateProcess API has a CREATE_BREAKAWAY_FROM_JOB process creation flag which does this.

          Please add a -BreakawayFromJob switch parameter to Start-Process which can be used to set this process creation flag.

          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]: using module that import a script that import classes have unexpected behavior within a class

            ClassA.psm1
            ------------------
            class ClassA
            {
            [string]Execute()
            {
            return "this is from ClassA"
            }
            }

            ClassB.psm1
            ------------------
            class ClassB
            {
            [string]Execute()
            {
            return "this is from ClassB"
            }
            }

            ImportClasses.ps1
            -------------------------
            using module 'D:\Exemple\Atelier\ClassImportProblem\ClassA.psm1'
            using module 'D:\Exemple\Atelier\ClassImportProblem\ClassB.psm1'

            process_Classes.ps1
            ----------------------------
            using module 'D:\Exemple\Atelier\ClassImportProblem\ImportClasses.ps1'

            $a = [ClassA]::new()
            $b = [ClassB]::new()

            class HustonweHaveAProblem
            {
            [void]HereWeGo(){
            $a = [ClassA]::new()
            $b = [ClassB]::new()
            }
            }

            Observation:

            From that point, instances of ClassA and ClassB are working fine in the process_Classes script. But instances of ClassA and ClassB within the class HustonWeHaveAProblem{} throw errors.

            Actual result:

            At D:\Exemple\Atelier\ClassImportProblem\process_Classes.ps1:9 char:15
            + $a = [ClassA]::new()
            + ~~~~~~
            Unable to…

            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 →
            • "Test-NetConnection" add timeout

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

              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 →
              • Please make this DNSServer module available on the Linux distribution of Powershell (pwsh)

                If DNSServer module was available on Linux' powershell, Terraform would be able to provide infrastructure configuration for Windows DNS Server. This would benefit enterprises who are now using Terraform to implement infrastructure as code ...

                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 Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                • PowerShell ISE CurrentPowerShellTab AddFile focus not on the editor pane

                  When running ISE commands like $psISE.CurrentPowerShellTab.Files.Add(...) to open a new script file in ISE the focus should be in the editor pane.
                  However, with the Windows update of Windows 10 Pro (1803) 10.0.17134 when a file is opened using $psISE.CurrentPowerShellTab.Files.Add(…) the focus is not on the editor window of the file but the ISE editor tab. Why has this changed?

                  This is extremely annoying since we now have to refocus the cursor on to the editor windows before typing or selecting a command to run.

                  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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                  • PS 5.1 Bug: Restart-Computer hangs PowerShell after completion when passing large array of ComputerNames

                    when I call:
                    Restart-Computer -ComputerName $lotsOfComputers -Force

                    where: $lotsOfComputers is 20-150 other computers on the LAN in our AD environment

                    This is the sequence of events: First, the command completes quickly, the expected computers reboot, and no errors are displayed. I can then type in the console exactly 1 new line of input and hit enter, after which the PowerShell console hangs for a long period of time (several minutes), possibly in correlation to the size of the array of computers. Once it begins hanging it does not register any new keyboard input onscreen during the hang (but it does…

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

                      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 →
                      • Get-DnsServerZone does not cater for secondary zones that allow zone transfers

                        If you have a secondary zone which in turn is configured to allow a zone transfer to another DNS server hosting the zone as a secondary, the Get-DnsServerZone cmdlet does not display that information.

                        Run: Get-DnsServerZone -Name zone.name | where-object {$_.zonetype -eq "secondary"} | select-object ZoneName, SecondaryServers
                        Result: Display zone name and secondary servers.
                        Actual Result: Displays just the zone name, no secondary servers are displayed even though they are setup.

                        The data is however available via WMI.

                        Get-WmiObject -Namespace root/microsoftdns -Class microsoftdns_zone | where-object {$_.containername -eq "zone.name"} | select-object containername, secondaryservers

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

                          Microsoft should make CircuitPowerShell to further enable IoT like there is CircuitPython.

                          https://forums.adafruit.com/viewtopic.php?f=60&t=143726

                          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 →
                          • Automatic Conflict Resolution For Partial Configurations

                            The LCM is already able to detect conflicts, with a fairly small change you could make it automatically resolve it.
                            In my opinion we should be able to set a priority of each partial configuration in the meta config of the LCM.
                            With a priority set and when a conflict is detected, the LCM could look at the priority and choose a winner.

                            You could than create a layered approach of partial configs (by different teams) without having to be afraid of running into conflicts.

                            This is something I see more people struggling with, which results in solutions like datum…

                            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 →
                            • Import-DSCResource for File, others fails

                              When using Import-DSCResource -Name, various OOB resources do not work. Consider 'File' which is a built in resource, the following code will fail.

                              Configuration Sample
                              {
                              Import-DSCResource -Name File

                              # This will generate two .mof files, a localhost.mof, and a server02.mof
                              Node @('localhost', 'server02')
                              {
                              File SampleFile
                              {
                              DestinationPath = 'C:\Temp\temp.txt'
                              Contents = 'This is a simple resource to show Configuration functionality on a Node.'
                              }
                              }
                              }

                              Sample -OutputPath P:\temp\

                              Start-DSCConfiguration P:\temp -computername localhost -wait -verbose

                              If you change the resource to Service, it works as expected.

                              I'm guessing this is because File is a binary resource under System32\Configuration,…

                              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 →
                              • Find-DSCResource does not find resources.

                                Find-DSCResource does not find resources. The wildcarded -Name parameter does not find anything when used, the Filter parameter seems to map Module names only, and even used seems to miss resources.

                                To reproduce:

                                Find-DSCResource -Name *time* - finds nothing
                                Find-DSCResource -Filter time - does not find newer TimeZone resource (only xTimeZone)

                                Find-DSCResource -Filter *time* does not find anything.

                                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 →
                                • 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 →
                                  • Make Add-Type support .EXE assemblies (works on rename to .DLL)

                                    Running Add-Type with a .EXE assembly gives, 'Cannot add type. The ".EXE" extension is not supported'. But it works if I rename the assembly to .DLL. I think this limitation is artificial and should be removed.

                                    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 →
                                    • about_using help topic doesn't exist

                                      On docs.microsoft.com there is a help topic for about_using which describes the using keyword that is new in Windows PowerShell 5.0 (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_using?view=powershell-5.0).

                                      Running:
                                      Get-Help about_using
                                      returns the help topic about_Remote_Variables which describes the $Using prefix used to access local variables from a remote session because that help topic has the keyword "about_Using".

                                      The about_using help topic should be added to the help topics for Windows PowerShell 5.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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Get-NetQosFlowControl -InterfaceAlias

                                        Hi,

                                        I`m trying to implement "Get-NetQosFlowControl -InterfaceAlias <name>" cmdlet using WMI. I want to query adapter specific NetQosFlowControl configuration.

                                        I don't see any available API in WMI to do this.

                                        How could I get adapter specific NetQosFlowControl configuration using only WMI?

                                        Thanks,
                                        Alexander

                                        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  ·  WMI  ·  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.

                                          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  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base