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. Out-GridView should not leave a trailing tab character when ctrl+c is used with only one data row present.

    I wrote a script that takes a MAC address in any common format as input and outputs it to all other standard MAC formats. This is all in a single row of data and is meant to be a convenient tool for working between systems that use different formats of MACs without having to constantly reformat them by hand. However, when copying the output from the gridview a trailing tab is placed at the end of the MAC even though there is only a single row in the view and no tabs in the original text. It's like it is…

    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
    • Hardware Manufacturing Guides: Adding DISM cmdlets in PowerShell to complement guides & GitHub contribution

      Following the Manufacturing guides - the PowerShell DISM Module is still lacking several cmdlets for the remaining DISM command lines available in the command prompt.
      Is there a reason for not having them all there?
      I wanted to make some scripts for the module, but could only find the DSC xDISMFeature
      Is there a DISM Module GitHub repository?

      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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
      • [bug]: Get-ADUser -Filter {[attribute] -ne "ms"} filters out objects that return as null

        If you do a get-aduser -filter {company -ne "ms"}, the results filter out accounts that have no value for the company attribute defined. In my opinion this should not be the expected behavior; it should return all accounts, including the ones with a null company attribute, however it should not include results that have the company equal to "ms". The same behavior is also present with other attributes, such as "manager".

        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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
        • [BUG] Configuration enact fails when resource instances of same type have different PSDscRunAsCredentials

          Take a look at the following configuration:
          $configurationData =
          @{
          AllNodes =
          @(
          @{
          NodeName = 'S16-01'
          PsDscAllowPlainTextPassword = $true
          PSDscAllowDomainUser = $true
          }
          )
          }

          Configuration DSCRunDemo
          {
          param (
          [pscredential] $Credential
          )
          Import-DscResource -ModuleName PSDesiredStateConfiguration

          Node $AllNodes.NodeName
          {
          Script DSCRunDemo1
          {
          SetScript =
          {
          Write-Verbose -Message $(whoami)
          }
          TestScript =
          {
          return $false
          }
          GetScript =
          {
          return @{}
          }
          PsDscRunAsCredential = $Credential
          }

          Script DSCRunDemo2
          {
          SetScript =
          {
          Write-Verbose -Message $(whoami)
          }
          TestScript =
          {
          return $false
          }
          GetScript =
          {
          return @{}
          }
          }
          }
          }

          DSCRunDemo -ConfigurationData $configurationData -Credential (Get-Credential)

          One instance of the…

          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

            investigating  ·  0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
          • [BUG]New-PSDrive FileSystem does not work for Backup-SqlDatabase

            The -BackupFile parameter for the Backup-SqlDatabase cmdlet does not work properly with a drive created with the New-PSDrive cmdlet. It will first pull the default backup drive for the SQL Server then append the string for the file system. For example:

            New-PSDrive -Name "fs" -PSProvider FileSystem -Root "\\MyFileServer\Backups"
            Backup-SqlDatabase -Database "MyDatabase" -ServerInstance "MySQLServer" -BackupFile "fs:\MyDatabase.bak"

            Would error with "Cannot find the path 'C:\BackupPath\fs:\MyDatabase.bak'"

            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  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
            • Catch illegal syntax in array definition

              Today I had an issue where getting an element at a certain index in a typed array failed. As I was troubleshooting this issue I found that it was simply because I had used a '.' (dot) instead of a ',' (comma) to separate the elements when I defined the typed array variable.
              Okay, that is a clear mistake on my part. However, as I thought about it I would have loved to be alerted by the Powershell engine .

              -- Experienced on v5.1.14409.1012 of PowerShell
              -- Win7 x64 OS

              TO REPRODUCE:

              open vscode
              create ps1 file
              $array = "hej",…

              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: GetMetaConfiguration should validate property values against allowed values of MSFT_DSCMetaConfiguration CIM Properties

                Once a node meta configuration is enacted, it is easy for an administrator or process (with malicious intent) to modify the MetaConfig.mof file in C:\Windows\System32\Configuration directory. The GetMetaConfiguration method in MSFT_DscMetaConfiguration class does not validate the property values against the allowed values of the CIM properties.

                Steps to reproduce this behavior:
                - Enact a simple meta configuration and enact it.
                - Open the MetaConfig.MOF file in your favorite editor and change the value of ConfigurationMode to some random text.
                - Save the file and close it.
                - Run Get-DscLocalConfigurationManager.
                - You will see the random value assigned to ConfigurationMode in…

                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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →

                  Ravikanth,

                  We have validated this issue and created two bugs for it.

                  1. We will validate the MOF when it is passed in as part of our API (i.e. Set-DscLocalConfigurationManager) and error if the values are not valid.
                  2. We will write a warning when Get-DscLocalConfigurationManager reads a MOF that has invalid values and at LCM startup. The resultant behavior will behave like it does today where invalid values will be read as the default value by the LCM.

                  Please let us know if this meets your expectations.

                  Regards,

                  MarkG

                • Make the Continue statement work in ForEach-Object

                  Within in ForEach-Object script block, "continue" behaves like "break", and one should use "return" to simulate "continue". But, from my perspective, it would make sense to give "continue" foreach-object awareness

                  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: Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable

                    Integrated Modules are not loaded if you have a Network Path in $env:PSModulePath which is not reachable.

                    ##############
                    I have customized the PSModulePath:

                    PS C:\Users\username> ($env:PSModulePath).split(';')
                    C:\Users\username\Documents\WindowsPowerShell\Modules
                    C:\Program Files\WindowsPowerShell\Modules
                    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
                    c:\Program Files\Microsoft Security Client\MpProvider\
                    C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\
                    \\my.domain\share\Modules\

                    ##############
                    If i try to execute e.g. Invoke-RestMethod

                    PS C:\Users\username> Invoke-RestMethod
                    Invoke-RestMethod : The 'Invoke-RestMethod' command was found in the module 'Microsoft.PowerShell.Utility', but the
                    module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.
                    At line:1 char:1
                    + Invoke-RestMethod
                    + ~~~~~~~~~~~~~~~~~
                    + CategoryInfo : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
                    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule


                    PS C:\Users\username> Get-Command Invoke-RestMethod
                    Get-Command : The term…

                    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

                      1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                    • Powershell ISE crashes when saving an ini file (I tried config.ini)

                      I created a new file, saved as config.ini, and then ISE crashed. When I reopened, it crashed again.

                      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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                      • powershell_ise has stopped working

                        Problem Description:
                        I installed KB3134760 update in Server 2008. The powershell_ise has stopped working. Does anyone have the same problem?
                        Thanks

                        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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                        • RSS Feed for Modules

                          It is currently hard to get notifications when PowerShell modules get updated. It would be nice if there would be an RSS feed for new versions of a package, then my RSS reader could notify me that a new version is available and I could take action.

                          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 Gallery  ·  Flag idea as inappropriate…  ·  Admin →
                          • Bug: Powershell ISE recovered to wrong integrity level in two sessions

                            A crashed powershell ISE session will re-open previously open files.

                            There is a bug, though, which manifested when a crash recovery happened to me recently:

                            The session/file which I had originally opened in standard user context (no elevation) recovered in High integrity level (aka elevated/admin),
                            The session/files which I had originally opened in elevated mode recovered in Medium integrity level (aka standard user mode).

                            The session should remember which context it was open in and re-open in the same context.

                            Need to consider this issue for normal ISE closure/re-opening, too, as in this UserVoice item:
                            "Windows PowerShell ISE: Add ability…

                            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  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
                            • Dynamic Parameters and Positional parameters do not work as expected

                              Problem description and example: https://stackoverflow.com/questions/45021674/how-do-you-specify-both-static-and-dynamic-positional-parameters-in-powershell

                              1) It is not clear that the position attribute is relative to other parameters of the same type, and that static parameters always come before dynamic parameters.
                              2) If you run get-help (full) on the function described in the link it will show the literal position assignment, not their position as PowerShell expects them (i.e. the static parameter is listed as position 3, when it is actually position 0)
                              3) Tabbing through the options list (using ISE or PowerShell) behaves according to the literal position assignment, not their position as PowerShell expects them (i.e. if…

                              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  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
                              • Provide a native ternary operator

                                It would be very nice and convenient if PowerShell had a native ternary operator like C# does (https://msdn.microsoft.com/en-us/library/zakwfxx4(v=vs.100).aspx).

                                Basically it would allow you to write a short-hand if-else statement, so instead of having to write:

                                if ($someBoolCondition)
                                {
                                $x = $y.Property1
                                }
                                else
                                {
                                $x = $y.Property2
                                }

                                you could just write:

                                $x = $someBoolCondition ? $y.Property1 : $y.Property2

                                This operator is fairly standard in many programming languages, so it would be awesome if PowerShell could come up to speed with it as well. Thanks.

                                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

                                  2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                • Bug comparing identical DSC resources with complex properties

                                  I have system modules that are deployed in nodes according to the configuration data file (psd1). For example, one node can have three modules, or there may be three nodes each one with a module.
                                  All modules have a common configuration, so I put this configuration in a separate composite resource. Then, if there are more than one module in a node, the resulting configuration will have duplicate resources.
                                  The problem occur when one of these duplicate resources have some complex property. Here is a simplified version of my configuration:

                                  Configuration BaseWebConfiguration
                                  {
                                  Import-DscResource -ModuleName xWebAdministration

                                  xWebsite DefaultSite
                                  {
                                  Ensure…

                                  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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Change validation error wording when using [ValidateCount()]

                                    When I run a simple function, like the following, I get an error, as expected that I've exceeded the number of values I can specify for the function parameter(-ComputerName). The wording says that I need to "Provide fewer than 3 arguments...". Because I can specify up to 3 arguments, I think the wording needs to change to say something like "Provide no more than 3 arguments,..." or "Provide 3 arguments, or less,...".

                                    Function Get-OSInfo
                                    {
                                    [CmdletBinding()]
                                    Param
                                    (
                                    [ValidateCount(1,3)]
                                    [string[]] $ComputerName
                                    )
                                    Get-WmiObject -Class Win32_OperatingSystem -ComputerName $ComputerName
                                    }
                                    Get-OSInfo -ComputerName 'one','two','three','four'

                                    Get-OSInfo : Cannot validate argument on parameter 'ComputerName'. The…

                                    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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                    • ordered class

                                      Cannot declare [ordered] fields/properties in script classes

                                      The following fails to work as expected, in multiple ways:

                                      Class Foo { [ordered] $myfield }

                                      When executing directly from an interactive shell, the output is:

                                      An error occurred while creating the pipeline.
                                      + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
                                      + FullyQualifiedErrorId : RuntimeException

                                      When executed from a script via ". .\myscript.ps1" the error is:

                                      Value cannot be null.
                                      Parameter name: type
                                      At line:1 char:1
                                      + . .\myscript.ps1
                                      + ~~~~~~~~~~~~~~~~
                                      + CategoryInfo : OperationStopped: (:) [], ArgumentNullException
                                      + FullyQualifiedErrorId : System.ArgumentNullException

                                      What I find especially interesting is that it 'line:1 char:1' regardless of…

                                      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  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
                                      • When is Powershell v6 due to be released?

                                        When is Powershell v6 due to be released Will it work with Windows 10?

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

                                          Please make sure that the option:
                                          Set-PSReadlineOption -EditMode Vi
                                          works as expected in ISE as it does in the powershell.exe so we have a consistent working environment.

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

                                          Feedback and Knowledge Base