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. Test-DscConfiguration returns a String instead of a Boolean value

    Test-DscConfiguration returns a String instead of a Boolean value.

    Contrary to what is mentionned in the documentation, the function Test-DscConfiguration does not return a boolean value.

    When you do a GetType() of the return value of Test-DscConfiguration you get a string with 'true' or 'false'.

    It's impossible to do a simple if (Test-DscConfiguration) because the string 'false' enter inside the if, we are forced to cast the return value of this cmdlet in boolean or to do the comparison with -eq $True, which seems to cast it automatically.

    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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    • Get-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

      It's annoying that we have to report Bugs in UserVoices
      and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

      Anyway:

      Hello

      If we create this Directory Junction between local Drives:
      mklink /J C:\Temp D:\Data\Temp\

      So that accessing: C:\Temp\
      in fact works here: D:\Data\Temp

      Now, if we call e.g.
      (Get-Item C:\Temp\MyFile.txt).Target

      We get:

      Wrong: Target : {C:\Data\Temp\MyFile.txt}
      Should be: Target : {D:\Data\Temp\MyFile.txt}
      It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
      (Assuring to return the right Target on different LinkTypes, is the most important reason for this…

      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-Item / Get-ChildItem returns wrong Target-Property if Item is on a Directory Junction to another drive

        It's annoying that we have to report Bugs in UserVoices
        and its a shame that M$$ is fixing BUGS only if there are enough UserVoices.

        Anyway:

        Hello

        If we create this Directory Junction between local Drives:
        mklink /J C:\Temp D:\Data\Temp\

        So that accessing: C:\Temp\
        in fact works here: D:\Data\Temp

        Now, if we call e.g.
        (Get-Item C:\Temp\MyFile.txt).Target

        We get:

        Wrong: Target : {C:\Data\Temp\MyFile.txt}
        Should be: Target : {D:\Data\Temp\MyFile.txt}
        It's a shame that M$ still does not have Unit Tests to validate the most basic situations.
        (Assuring to return the right Target on different LinkTypes, is the most important reason for this…

        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 →
        • Receive-Job duplicates Write-Host output

          Starting in PowerShell 5.1, if a background job uses Write-Host, the Receive-Job cmdlet shows each line of output twice.

          # Steps to Reproduce
          1. Run this command: `Start-Job { 1..10 | % { Start-Sleep -Milliseconds 10 ; Write-Host $_ } } | Wait-Job | Receive-Job`
          2. Note the duplicate numbers. This error does not happen in Powershell 6.0.4.

          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

            2 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
          • Fix Get-InsightsCapabilityResult -Name Parameter to accept wild cards

            The Get-InsightsCapabiloityResult cmdlet is part of the SystemInsights module in Server 2019.

            This cmdlet takes a Name parameter. This parameter specifies which capability results to return. It would be helpful if this parameter accepted a wildcard (* or *cpu*) to return some but possibly not all results.

            This would improve the ease of use of this cmdlet in production.

            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 →
            • Support line-wrapping in the ISE console pane

              It would be great if lines would automatically wrap in the console pane of the Integrated Scripting Environment (ISE), just like they do in the Powershell console.

              Currently, if the PowerShell ISE console pane is not wide enough, one has to scroll horizontally to see the beginning of the currently edited line.

              One workaround is to use the backtick (`) character to split the command in multiple lines but this is not very practical.

              Here are some examples of other people wanting to do this:
              [2015] https://superuser.com/questions/871178/line-wrapping-in-powershell-ise-console
              [2015] https://stackoverflow.com/questions/30710740/powershell-ise-console-window-command-line-word-wrap

              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 →
              • Online HELP no longer has any valid links.

                Recently the new "docs"" site was implemented on MS. The old TechNet and MSDN PowerSHell help documentation is now buried and hard to access. The new help is no longer linked to any help for an CmdLet. We get "404" for all attempts.

                Also the new doc style is very pretty but not very useful. Same for the new Net class browser. On both the documentation is incomplete and has many errors compared to the original documentation.

                Please address this as using the documentation has become a nightmare. MS needs to go back to managing this directly and try and…

                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 →
                • Allow trailing commas

                  Trailing commas in lists are incredibly useful in a large number of instances, and there are very few good reasons and no really strong reasons not to.

                  Not allowing trailing commas is inconvenient in many situations: it frequently turns a one-line commit into two, polluting history (all I did was remove a comma from that line); it can complicate (and often put bugs in) code-generation ("$str += $value + "," doesn't cut it)

                  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 →
                  • Issue with running commands on remote machine

                    Hi Team,

                    I am using powershell to trigger commands on remote machine (as this doesn't require anything additional package to install). Recently I am facing issues with running commands on remote machine.

                    $ComputerName = "***.***.***.***"

                    Function ExecuteCommand() {
                    Get-PSDrive
                    }

                    Set-Item WSMan:\localhost\Client\Trustedhosts -Value $ComputerName -Concatenate -Force

                    $Credentials = Import-Clixml $CredentialsFile

                    Invoke-Command -ComputerName $ComputerName -Credential $Credentials -ScriptBlock ${function:ExecuteCommand} -HideComputerName

                    I am storing the credentials in the file and using the above script to run commands on remote machine.

                    1. Get-PSDrive doesn't return mapped network drive details.
                    2. using net use command to map network path. Network path gets mapped successfully but…

                    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 →
                    • Reset LCM configuration

                      Reset LCM configuration.

                      Hi and sorry for my funny English.
                      When I configure my LCM, it's impossible to reset state.
                      If I want a default configuration, I send a new configuration this default value for all Settings (here, no value, just settings).

                      [DscLocalConfigurationManager()]
                      Configuration ResetLCM {
                      Node MyNode {
                      Settings {
                      ActionAfterReboot =
                      AllowModuleOverwrite =
                      CertificateID =
                      ConfigurationDownloadManagers =
                      ConfigurationID =
                      ConfigurationMode =
                      ConfigurationModeFrequencyMins =
                      DebugMode =
                      MaximumDownloadSizeMB =
                      RebootNodeIfNeeded =
                      RefreshFrequencyMins =
                      RefreshMode =
                      ReportManagers =
                      ResourceModuleManagers =
                      SignatureValidations =
                      StatusRetentionTimeInDays =
                      }}

                      I think it's easier to use command.

                      For example, there is a reset configuration for DSCConfigurationDocument. …

                      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  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
                      • 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 →
                        • New-SmbShare -Whatif not working

                          New-SmbShare with -Whatif switch NOT working, it runs the command instead of showing the whatif massage

                          Test with vscode insider

                          Name Value
                          ---- -----
                          PSVersion 5.1.17134.228
                          PSEdition Desktop
                          PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
                          BuildVersion 10.0.17134.228
                          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

                            1 comment  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
                          • Module Cmdlets missing after Import-Module

                            I have started experiencing an issue on multiple machines where modules that once worked fine now stop functioning correctly.

                            The issue appears to affect Windows 10 machines that have been in service for some time, but does not affect new Windows 10 installs. This leads me to believe that something like a windows update broke the correct functioning of the module import functionality on these machines at some point in the past.

                            The modules in question have been SQLPS (installed with SSMS), SqlServer (from PSGallery), and AWSPowerShell (also from PSGallery). The issue is that after installing the module and importing…

                            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 →
                            • Code analysis inside of a try block in a class thinks a variable isn't assigned when it is.

                              Import-Module says that $variable2 is not assigned, but there is no way to reach its usage in the Write-Host without the variable having a value.

                              Class MyClass {
                              DoThing() {
                              $variable1 = "var1"
                              try {
                              $variable2 = "var2"
                              } finally {
                              Write-Host "Tidying"
                              }

                              Write-Host $variable1
                              Write-Host $variable2
                              }
                              }

                              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 →
                              • The VSTS Deploy task Azure PowerShell and Build task - PowerShell are not able to handle secret variables and Azure key vault variables corr

                                1.Issue:
                                The VSTS Deploy task Azure PowerShell and Build task - PowerShell are not able to handle secret variables and Azure key vault variables correctly while writing their values to console using write-host. This is causing the values of secret variables to the exposed in log files.

                                2.Steps to reproduce

                                a. Sample script:

                                param(
                                [Parameter(Mandatory=$true)]
                                [string]$Secretvariablewithspecialcharacter,
                                [Parameter(Mandatory=$true)]
                                [string]$normalVariablewithspecialcharacter,
                                [Parameter(Mandatory=$true)]
                                [string]$Secretvariablewithnospecialcharacter
                                )
                                Write-Host "Printing parameters:"
                                Write-Host "Secretvariablewithspecialcharacter: $Secretvariablewithspecialcharacter"
                                Write-Host "normalVariablewithspecialcharacter: $normalVariablewithspecialcharacter"
                                Write-Host "Secretvariablewithnospecialcharacter: $Secretvariablewithnospecialcharacter"

                                $notspecialcharacter="1234abcd";
                                $specialcharacter ="1234§-¤%#&/=abcd"

                                Write-Host "notspecialcharacter: $notspecialcharacter"
                                Write-Host "specialcharacter: $specialcharacter"

                                if ($Secretvariablewithspecialcharacter -eq $specialcharacter)
                                {
                                Write-Host "Secretvariablewithspecialcharacter $Secretvariablewithspecialcharacter and $specialcharacter specialcharacter match"
                                }

                                else
                                {
                                Write-Host "Secretvariablewithspecialcharacter '$Secretvariablewithspecialcharacter'…

                                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 →
                                • "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…

                                  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 →
                                  • Enable-ClusterStorageSpacesDirect Needs a -FORCE parameter for consistency

                                    The Enable-ClusterStorageSpacesDirect cmdlet does not have a -FORCE parameter.

                                    When you run the cmdlet, you get a pop-up confirmation prompt. To avoid this, the cmdlet should have a -FORCE parameter.

                                    It's true you can use -CONFIRM:$FALSE - but that is inconsistent with other cmdlets throughout PowerShell.

                                    For consistency add a -FORCE parameter to this cmdlet that avoids the popup confirmation. OF course, for compatibility, keep the $Confirm:$False.

                                    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 →
                                    • 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 →
                                      • Backport Powershell 6.x to Windows Powershell

                                        To keep Windows Powershell up to date please backport any new features from Powershell 6.x to Windows Powershell.

                                        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

                                          1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
                                        • The task "Windows Defender Verification" is producing a restore point every day.

                                          The task "Windows Defender Verification" is producing a restore point every day. There should be an additional parameter in "Set-MpPreference" to handle that issue.

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

                                          Feedback and Knowledge Base