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.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Test-DscConfiguration fails once running against remote machine

    Having the following script:

    configuration SimpleConfig2
    {

    Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
    
    

    node $remoteCommputer
    {
    Environment TestVersion
    {
    Ensure = "Present" # You can also set Ensure to "Absent"
    Name = "TestEnvironmentVariable"
    Value = "TestValue2"
    }
    }

    }

    SimpleConfig2

    Start-DSCConfiguration -Path "SimpleConfig2" -Force -Wait -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred -verbose

    $result = Test-DscConfiguration -Path "SimpleConfig2" -ComputerName $remoteCommputer -Credential $g_AutomationDefaultVMAccounCred

    The config is applied correctly, yet Test-DscConfiguration fails with the following message:

    The configurationData parameter is reserved for future use. The current configuration is used by default.

    + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    
    + FullyQualifiedErrorId : MI RESULT 4
    + PSComputerName : target-machine
    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    investigating  ·  Mark Gray responded

    Anton,

    I am not able to reproduce your issue. What PS / WMF version are you running into this on? Also what OSes are running on the local and remote machines?

    MarkG

  2. Issue with DSCFileDownloadManager Credentials

    So, it seems as though in WMF 5.0 there is a regression in functionality. In WMF 4.0, you could set up a DSCFileDownloadManager and Credential to have a Target Node contact a Pull Server SMB Share and download new mof files and resources. Everything worked perfectly including Certificate based encryption of the credentials. However, in WMF 5, it seems as though the LCM of the Target Node attempts to contact the SMB Share Anonymously, even in credentials are provided. Now, in a Non domain joined environment, you can just provide EVERYONE full control and then change Local Security Policy such…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    planned  ·  Zachary Alexander responded

    This bug has been identified and the issue has been resolved. The fix will be available in future releases, including the Windows Insider Fast Ring preview

  3. The parser for variable names isn't implemented according to spec

    According to the PowerShell language specification, the following variable names are illegal but the current PowerShell implementation accepts them:

    $:: = 3
    $::a = 3
    $variable:foo: = 5
    $:a:3 = 3

    which means that things like "$:a:3" currently act as "${:a:3}" rather than the expected "${:a}:3".

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  4. If module version is not specified, composite configurations fail to load

    BUG
    Version occurs in: WMF5 Production Preview
    Previous versions? No.

    In a composite configuration scenario, if one of the composite resources contains an import-dscresource statement, and multiple versions of the module are available, the resource fails to load unless a moduleversion is specified.

    The resource works fine if there is only one version available on the machine in question, or a minimum version is specified.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
    investigating  ·  Mark Gray responded

    Justin,

    This behavior is common to all DSC resources, if I understand your issue correctly. If there are multiple versions of a module installed on your authoring system, you must specify the version that you intend to use in your configuration.

    What behavior are you expecting?

    MarkG

  5. Bug: Get-Date works different to new-object DateTime

    Repro:

    635898816000000000

    635898816000000001

    There is extra 1 at the end with using Get-Date commandlet. It can be workaround by specifying -mil 0, but this is not what user expects..

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  6. Bug: Running `powershell "echo foobar" > nul` from the command prompt doesn't suppress output.

    Basically what the title says. If you run that from the command prompt, you will get output even if you shouldn't. For some reason, this specifically seems to affect NUL and not any other file.

    Related StackOverflow question: http://stackoverflow.com/a/35543250/4077294

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  7. Make modules and cmdlets available for current script

    The ability to package a script with the cmdlets and modules used to make that script.

    E.g.

    The ability to put a cmdlet at the start of the script such as:
    Monitor-ScriptModule -All

    Then as a module is imported or a cmdlet is used, the script will include the modules and cmdlets in some file that allows an admin to deploy the script to other workstations and the script is able to include the modules and cmdlets on older versions that may not have the cmdlets or modules included.

    This would help avoid older versions from not working because the…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Desired State Configuration (DSC)  ·  Flag idea as inappropriate…  ·  Admin →
  8. -New-NetTransportFilter LocalPortEnd<UInt16> has default port 1065

    Either provide explanation why start at 1065 & end at 65535 as defaults or correct the TechNet ?

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Documentation  ·  Flag idea as inappropriate…  ·  Admin →
  9. Scope for Environment variables

    To enhance modularity PowerShell needs to allow for scoped environment variables. CMD.exe did this years ago, with the SETLOCAL command, but a more sophisticated approach incorporating concepts like module-scope would be a real boon...

    Global variables are generally regarded as a bad idea, but that's how PowerShell has always treated environment variables. For backward compatibility, that obviously needs to be retained. But it should be possible to do things like

    $local:env:PATH += ";C:\Foo\bin"

    in one function (or module) without impacting other code.

    Obviously when Powershell spawns child processes for native commands, it would need to construct and pass the appropriate…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  10. psreadline module bug: cursor position error

    TITLE
    psreadline module bug: cursor position error

    【version】
    tested on powershell 5.0 in win10 1511 10586.104

    【reason】
    Cursor position error when chinese characters folder,or filename in console.
    see under test code.

    【reporter】
    By the chinese powershell research group. QQ group No. is 183173532

    【test code】
    PS F:\MP3\振奋> pwd <----- In any chinese characters folder,some block on 'pwd' left.

    Path

    F:\MP3\振奋

    PS F:\MP3\振奋> Remove-Module psreadline
    PS F:\MP3\振奋> pwd <----- Normal

    Path

    F:\MP3\振奋

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  11. PowerShell ISE Preview: Remoting isn't working (connection takes forever)

    PowerShell ISE Preview: Remoting isn't working (connection takes forever)

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  12. Bug: Syntax highlighting for DSC node block

    Scenario: In a PowerShell DSC configuration block, you create a node block, by specifying a static node name. The node name has a dash in it.

    In this case, the node name is colored blue, like a command, instead of purple, like a parameter value.

    If the node name does not have a dash in it, then it is properly colored purple.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  13. BUG: Powershell -NoExit does not dot source when run from VB2010

    Just upgraded from Windows 7 to Windows 10 and encountered a bug in Powershell 5.
    When using Process.Start from VB2010 to run Powershell command (even one as simple as "dir") works as expected. If however you use the -NoExit switch Powershell fails to dot source my global file, but instead tries to load it as a module - and throws an error. The same commands typed on the Powershell consol or a command prompt work with or without -NoExit.

    Powershell -Command "& { dir }"
    Powershell -NoExit -Command "& { dir }"

    The first command works from VB2010 (via Process.Start)…

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  14. [BUG] PowerShell ISE hangs when opening multiple files if Files.CollectionChanged event has a subscriber

    Powershell ISE (both 5.0 and ISEpreview) hangs when you open multiple files at the same time (open dialoge) when you subscribe to the event $psISE.CurrentPowerShellTab.Files.CollectionChanged .

    Works fine when a single document is opened/closed.

    $action = {

    Write-Host &quot;Test&quot;
    

    }

    Register-ObjectEvent -InputObject $psISE.CurrentPowerShellTab.Files -EventName CollectionChanged -Action $action -SourceIdentifier "ToggeRegionExpansionOnOpen"

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  15. Start signing the ISE Preview module

    The ISE preview module file "C:\Program Files\WindowsPowerShell\Modules\PowerShellISE-preview\5.1.1\PowerShellISE-preview.psm1" is not signed. Can you start signing it so it is available in an environment where running unsigned scripts is restricted by the execution policy.

    I know there are ways around this but it would be nice to see the file signed by MS.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  ISE and tooling  ·  Flag idea as inappropriate…  ·  Admin →
  16. Add write-information logic to write-warning and error

    Please give Write-Warning and Error the same functionality as the new write-information in WMF5.0.

    Would especially like the tag functionaliy

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Microsoft.PowerShell.* Modules  ·  Flag idea as inappropriate…  ·  Admin →
  17. [BUG] get-host returns wrong version number on Windows 10 1511 10586.71

    After updating to Windows 10 1511 10586.71, PowerShell get-host command still returns 10586.63 as the windows version number.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  18. Add "Send To > PowerShell" to Windows Explorer

    "Send To > PowerShell" should:


    1. Open PowerShell + run your profile.ps1

    2. Have PowerShell cd itself to the directory of the file (the change directory action shouldn't appear in PowerShell's command history list)
      3a. If the file is a folder, do nothing
      3b. If the file is a .ps1 or .exe file, PowerShell should insert ".\foo.whatever" on the prompt and put the cursor at the end. PowerShell should also make sure certain strings are quoted/ampersanded (basically, the same quoting/escaping/ampersanding algorithm that its filename completion uses should be applied)
      3c. Otherwise, PowerShell should insert "'.\foo.whatever'" on the prompt and put the cursor…
    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other PowerShell  ·  Flag idea as inappropriate…  ·  Admin →
  19. BREAK in nested Loops behaves weird

    I found a weird behavior of BREAK in nested loops.

    Here my test-code:

    1

    :OuterLoop ForEach ($x In 1..3) {
    'x' + $x
    :InnerLoop ForEach ($y In 1..8) {

      &#39; y&#39; + $y
    
    If ($y -ge 5) {
    Break InnerLoop
    }

    }
    }

    2

    :OuterLoop ForEach ($x In 1..3) {
    'x' + $x
    :InnerLoop ForEach ($y In 1..8) {

      &#39; y&#39; + $y
    
    If ($y -ge 5) {
    Break NoLoop
    }

    }
    }

    1 breaks the inner loop as expected.

    2 breaks the outer loop though I specified the not-existing label "NoLoop" for BREAK. I would expect an error or

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
  20. Execute multi-line command line using F8 without selecting the region.

    Consider the following in the script pane:

    Get-Command `
    -Verb Get

    If the cursor is on the first line containing "Get-Command" and if F8 is pressed, an "IncompleteString" error is generated. Since, there is a back-tick present at the end of the line, ISE should take the next line into account for execution.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    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